> I'm searching for the best concept of how to use and save hierarchical data
> in a J2EE server.
To me it looks like XML file structure, so I would consider
using XML database (probably native one like Xindice).
You can find a list of XML database at
http://www.rpbourret.com/xml/XMLAndDatabases.htm
or somewhere around ;)

Signature
Mladen Adamovic
http://home.blic.net/adamm
Florian Lindner - 16 Dec 2005 13:28 GMT
>> I'm searching for the best concept of how to use and save hierarchical
>> data in a J2EE server.
[quoted text clipped - 5 lines]
> http://www.rpbourret.com/xml/XMLAndDatabases.htm
> or somewhere around ;)
Hi,
Xindice is optimized for storing a large number of smaller XML documents.
AFAIK these document itself are not organized hierarchily. Please correct if
I am wrong.
I'll take a look at the list you provided. Thanks!
Florian
Mladen Adamovic - 16 Dec 2005 17:06 GMT
> Xindice is optimized for storing a large number of smaller XML documents.
> AFAIK these document itself are not organized hierarchily. Please correct if
> I am wrong.
You have right. Xindice isn't good for large documents. I've heard that
Berkeley DB XML is the best choice nowadays for the large XML documents.
That told me the guy whom I think is the real expert in this field.
Software AG's Tamino is supposed to be the best commercial product which
support large files.
If you don't find anything worth in above products you might look at the
my project - dummy XML:DB wrapper around MySQL at address
http://sourceforge.net/projects/myxmldb

Signature
Mladen Adamovic
http://home.blic.net/adamm
> Hello,
> I'm searching for the best concept of how to use and save hierarchical data
[quoted text clipped - 10 lines]
>
> Florian
The most straight forward way would be to store data in a normal sql
database.
One table for the hierarchy
create table dir
(
dir_id number,
parent_dir_id number,
dir_name varchar2(255),
dir_type number,
dir_metadata varchar2(255)
)
create table file
(
file_id number,
dir_dir_id number,
file_type number,
file_metadata varchar2(255)
)
Then you have a hierarcy defined in the table dir, and each file belongs
in exactly one dir (unless you make a N:N relationship ofcourse). You
could also store information about type and metadata in separate tables
or whatever suits your needs.
Next would be to select a persistence technology. This would work with
most known technologies and the easiest would probably be to use the
same as you use for other relational data in your application. Straight
jdbc, Hibernate, CMP ... it's your choice. CMP has some features to
manage relations automatically for you, and I'm sure Hibernate has some
features to help you out with the relational/hierarchical stuff here as
well.
This method would give you all the pros and cons that sql databases
always do, transactions and so on. I don't know how you intend to use
your hierarcy so it's impossible to tell if this is useful for you.
One alternative for storing hierarchical data that sometimes comes up is
using Prevayler (you'll find it at google), which is sort of a very fast
in-memory hierarchical database. I've never tried it, but it's
supposedly very fast, and has different characteristics from a normal,
relational dbms.