Database design with unknown number of parent/children

This is a discussion on Database design with unknown number of parent/children within the MySQL Database forums, part of the Database Forums category; Hi, I'm having a question about a database design. I'm having objects which have a parent-child relationship. ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-18-2008
pieter.thoma@gmail.com
 
Posts: n/a
Default Database design with unknown number of parent/children

Hi,

I'm having a question about a database design. I'm having objects
which have a parent-child relationship.

E.g.: obj_a is parent of obj_b, objc is parent of obj_d which is
parent of obj_e

Parent | Child
--------------------
obj_a | obj_b
obj_c | obj_d
obj_d | obj_e

My question now is how do you design a database that can take care of
this n-number of parent-children relationships and how do you query
this information in a dynamical way? I should not know upfront how
many parent-children relationships there are for a certain object.

Thankx in advance.

Pieter
Reply With Quote
  #2 (permalink)  
Old 01-18-2008
Captain Paralytic
 
Posts: n/a
Default Re: Database design with unknown number of parent/children

On 18 Jan, 09:32, pieter.th...@gmail.com wrote:
> Hi,
>
> I'm having a question about a database design. I'm having objects
> which have a parent-child relationship.
>
> E.g.: obj_a is parent of obj_b, objc is parent of obj_d which is
> parent of obj_e
>
> Parent | Child
> --------------------
> obj_a | obj_b
> obj_c | obj_d
> obj_d | obj_e
>
> My question now is how do you design a database that can take care of
> this n-number of parent-children relationships and how do you query
> this information in a dynamical way? I should not know upfront how
> many parent-children relationships there are for a certain object.
>
> Thankx in advance.
>
> Pieter


read the links on this page
http://del.icio.us/Captain_Paralytic/hierarchical
they reveal all (the last one in the list is particularly good)
Reply With Quote
  #3 (permalink)  
Old 01-19-2008
pieter.thoma@gmail.com
 
Posts: n/a
Default Re: Database design with unknown number of parent/children

On Jan 18, 10:51 am, Captain Paralytic <paul_laut...@yahoo.com> wrote:
> On 18 Jan, 09:32, pieter.th...@gmail.com wrote:
>
>
>
> > Hi,

>
> > I'm having a question about a database design. I'm having objects
> > which have a parent-child relationship.

>
> > E.g.: obj_a is parent of obj_b, objc is parent of obj_d which is
> > parent of obj_e

>
> > Parent | Child
> > --------------------
> > obj_a | obj_b
> > obj_c | obj_d
> > obj_d | obj_e

>
> > My question now is how do you design a database that can take care of
> > this n-number of parent-children relationships and how do you query
> > this information in a dynamical way? I should not know upfront how
> > many parent-children relationships there are for a certain object.

>
> > Thankx in advance.

>
> > Pieter

>
> read the links on this pagehttp://del.icio.us/Captain_Paralytic/hierarchical
> they reveal all (the last one in the list is particularly good)


Thanks for your suggestion!
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:49 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0