views:

57

answers:

2

Hi!

I'm doing a Java software-project at my university that mainly is about storing data-sets (management of software tests). The first thing I thought of was a simple SQL DB, however the necessary DB scheme is not available for now (let's say the project is stupid but there's no choice).

Is a persistency framework like Hibernate able to store data internally (for example in XML) and to convert this XML into decent SQL later?

My intention is to use the additional abstraction layer of a framework like Hibernate to save work, because it might have conversion functions. I know that Hibernate can generate class files from SQL, but I'm not too sure whether it needs a DB at every point during development. Using a XML Scheme for now and converting it into SQL later maybe an idea :)

A: 

I would recommand using a lightweight DB such as HSQLDB instead.

Maurice Perry
actually that doesn't really answer my question whether it makes sense to use an additional layer between my OO app and the db in order not to have to re-implement too much. :)
wishi
What I meant is that using an XML mapping first will only futher complicate things.
Maurice Perry
+1  A: 

You can persist XML with hibernate into a relational DB, but you cannot use XML directly as a storage engine. Why not simply store you're data into a relational db from the start - you'll create some schema yourself and you'll adapt it to the actual one when you receive it.

Bozhidar Batsov