Re: which database design should I use ?
Date: Tue, 25 Dec 2001 19:46:56 -0500
Message-ID: <9%8W7.219$%g3.237374511_at_news.netcarrier.net>
the thing to figure out is - is an order associated with every child from a given node down in the project tree?
if an OO DB is not an option - then you have to first solve how to store the
project info.
granted - sql databases aren't really good with hierarchical information -
that said -
you could have a table like "ProjectTree" with 2 columns: ProjectNumber,
ProjectNumberParent
at this point you could still just store ProjectNumber in the Order table -
James <jraustin1_at_hotmail.com> wrote in message
news:a6e74506.0112191625.5715c02f_at_posting.google.com...
> > I am having the following problem :
> >
> > After having created a general ORDER-table in my database, I should have
the
> > opportunity to relate each order to a certain project.
> > The obvious solution would be to create a PROJECT-table with a key-field
> > Projectnumber and to add a field to my ORDER-table that links to the
> > PROJECT-table :
> >
> > ORDER
> > Ordernumber (Primary key)
> > Projectnumber (Foreign key to projectnumber in PROJECT)
> > ...
> >
> > PROJECT
> > Projectnumber (Primary Key)
> > ...
> >
> >
> > However, there is a possibility that a certain project resides in
another
> > project. There can be several levels of sub-projects :
> >
> > e.g. : - Myproject
> > - MySubproject
> > - MySubSubproject
> > - MySubSubSubproject
> > - ...
> >
> > There should be a possibility to link each order to one or more of those
> > projects or subprojects.
> >
> > Can anyone help me how the database design should look like ?
>
> Complex/variable data structures are easier to represent/manipulate in
> an oodb. www.xdb1.com
Received on Wed Dec 26 2001 - 01:46:56 CET