You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Florian Lindner <ma...@xgm.de> on 2006/01/09 23:05:08 UTC

Concept for modeling hierarchical data

Hello,
I'm searching for the best concept of how to use and save hierarchical data.
I have a structure like PC file system with meta data. There a folder objects 
and files objects of different types. Every object have data like 
permissions, date and author. And they have type-specific data fields like 
resolution (of an image type) or location (of an meeting type) or ingredients 
(of an recipe type).
What is the best way to store that kind of data? What database is 
recommendable? What concepts of persistance? Or not using managed persistance 
and do it manually?

Thanks for all ideas!

Florian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Concept for modeling hierarchical data

Posted by David Smith <dn...@cornell.edu>.
Florian Lindner wrote:

>Hello,
>I'm searching for the best concept of how to use and save hierarchical data.
>I have a structure like PC file system with meta data. There a folder objects 
>and files objects of different types. Every object have data like 
>permissions, date and author. And they have type-specific data fields like 
>resolution (of an image type) or location (of an meeting type) or ingredients 
>(of an recipe type).
>What is the best way to store that kind of data? What database is 
>recommendable? What concepts of persistance? Or not using managed persistance 
>and do it manually?
>
>Thanks for all ideas!
>
>Florian
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>  
>
There is also JSR-170 which defines an API for storing data 
hierarchically.  The Jackrabbit project is one implementation of it and 
currently used in the Magnolia CMS.

JSR-170 spec: http://www.jcp.org/en/jsr/detail?id=170
Jackrabbit project: http://incubator.apache.org/projects/jackrabbit.html
Magnolia CMS: http://www.magnolia.info

--David

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Concept for modeling hierarchical data

Posted by Florian Lindner <ma...@xgm.de>.
Am Dienstag, 10. Januar 2006 07:51 schrieb Nikola Milutinovic:
> Florian Lindner wrote:
> >Hello,
> >I'm searching for the best concept of how to use and save hierarchical
> > data. I have a structure like PC file system with meta data. There a
> > folder objects and files objects of different types. Every object have
> > data like permissions, date and author. And they have type-specific data
> > fields like resolution (of an image type) or location (of an meeting
> > type) or ingredients (of an recipe type).
> >What is the best way to store that kind of data? What database is
> >recommendable? What concepts of persistance? Or not using managed
> > persistance and do it manually?
>
> If you want to do it manually, a hierarchical tree can be represented by
> just one table:
>
> CREATE TABLE tree (
>     id   INTEGER   PRIMARY KEY,
>     parent_id   INTEGER
> );
>
> With managed persistence, be carefull not to configure it to load the
> entire tree at once.
>
> As for a DB, any decent relational DB will do.

In this concept I need a table for every type of objekt I want?

Regards,

Florian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Concept for modeling hierarchical data

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
Florian Lindner wrote:

>Hello,
>I'm searching for the best concept of how to use and save hierarchical data.
>I have a structure like PC file system with meta data. There a folder objects 
>and files objects of different types. Every object have data like 
>permissions, date and author. And they have type-specific data fields like 
>resolution (of an image type) or location (of an meeting type) or ingredients 
>(of an recipe type).
>What is the best way to store that kind of data? What database is 
>recommendable? What concepts of persistance? Or not using managed persistance 
>and do it manually?
>  
>

If you want to do it manually, a hierarchical tree can be represented by 
just one table:

CREATE TABLE tree (
    id   INTEGER   PRIMARY KEY,
    parent_id   INTEGER
);

With managed persistence, be carefull not to configure it to load the 
entire tree at once.

As for a DB, any decent relational DB will do.

Nix.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org