0

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.

2 Answers 2

1

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.

0

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 ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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