Subject Re: [firebird-support] Re: Database tree-like structure
Author Martijn Tonies
> > Another way to do this is:
> >
> > Items
> > -----
> > ItemID Integer
> >
> > Links
> > -----
> > ParentID --> Items.ItemID
> > ChildID --> Items.ItemID
> >
> >
> > This has no NULLs ...
>
> Hello Martijn,
>
> thank you for your kind reply. I'm not sure how to store more ChildID
> links, when there's 1:n - parent:child relationship.

Links
-----
1, 2
2, 3
1, 4
1, 5
1, 6


4 childs for the same parent. item 2 has 1 child (which is item 3).

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com