Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am developing a Java application. While using the application, data would be generated that needs to be stored on disk. I am looking for an embedded database appropriate for a average use-case of the application.

Initially I planned to use XML for storing information. But, then after some articles, I found a general opinion that XML is not a very good way for adding information due to I dunno why :P

This is roughly the XML format, if I use it. It will give you a brief overview of the data-structure.

<A>
  <B>
     <C>something</C>
  </B>
  <B>
     <C>some other thing</C>
     <C>one more thing</C>
  </B>
</A>

The data generated would be mostly elements/objects of type C. The data would seldom be deleted. It would be mostly be added or searched upon. In such a scenario what would be a good choice for storing the data.

  1. XML.
  2. Embedded Database.
  3. Something else.

I also looked up some embedded database options. The ones that I found most used are H2 and Java DB (I guess same as Apache Derby?) and SQLite. Which one in your experience has given you better results.

share|improve this question

2 Answers 2

it seems like your data has Hierarchical nature. for that u can use GlobalsDB its free, Hierarchical and have java bindings. more importantly you wouldn't be requiring any Object mappings ...

share|improve this answer

So, the question to ask yourself is: "What are the use cases for this data?". Is reporting going to happen over this data? Does it need to be transformed? Does it need to be distributed? Does it need to be human readable? Does it need to be written fast? Read fast?"

Also "How much hardware have I got to play with for memory and disk storage?"

In other words it depends :-). From my personal experience I've really enjoyed using HSQL.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.