dbTalk Databases Forums  

Parent-Child constraints

comp.databases.informix comp.databases.informix


Discuss Parent-Child constraints in the comp.databases.informix forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lehr
 
Posts: n/a

Default Parent-Child constraints - 02-11-2011 , 08:16 AM






Hello All

I am looking for insights, opinions, pros/cons, etc
regarding having a parent id field within a table self referencing
itself to children
within that same table versus setting up another table that houses the
parent ID's
relating back to the other table that houses the children

Thoughts?

Thanks
Tom

Reply With Quote
  #2  
Old   
TBP
 
Posts: n/a

Default Re: Parent-Child constraints - 02-11-2011 , 10:53 AM






On Feb 11, 2:16*pm, Tom Lehr <tomc... (AT) gmail (DOT) com> wrote:
Quote:
Hello All

I am looking for insights, opinions, pros/cons, etc
regarding having a parent id field within a table self referencing
itself to children
within that same table versus setting up another table that houses the
parent ID's
relating back to the other table that houses the children

Thoughts?

Thanks
Tom
Hmmm ... theory would be "Parent Table / Child Table" i.e. a 1 => Many
or even a 1 => 1 relationship.

Give an example - i.e. what constitutes a "parent" and a "child" and
how are these represented as an identical entity if in a single table?

I s'pose something like :

Person1 -> ID1, GrandMum ID2
Person2 -> ID2, GrandMum NULL
Person3 -> ID3, GrandMum ID1

To have Daughter -> Mum -> GrandMum??

Reply With Quote
  #3  
Old   
Art Kagel
 
Posts: n/a

Default Re: Parent-Child constraints - 02-11-2011 , 03:17 PM



The self referencing parent/child table is a standard paradigm. When it
fits the world, there is no reason to shoehorn the world into another
model. Informix 11.70 even has new syntax and optimization to better
support these kinds of self-referencing relationships.

Art

Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art (AT) iiug (DOT) org)
Blog: http://informix-myview.blogspot.com/

Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.



On Fri, Feb 11, 2011 at 9:16 AM, Tom Lehr <tomcaml (AT) gmail (DOT) com> wrote:

Quote:
Hello All

I am looking for insights, opinions, pros/cons, etc
regarding having a parent id field within a table self referencing
itself to children
within that same table versus setting up another table that houses the
parent ID's
relating back to the other table that houses the children

Thoughts?

Thanks
Tom
_______________________________________________
Informix-list mailing list
Informix-list (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list

Reply With Quote
  #4  
Old   
Mark Scranton
 
Posts: n/a

Default Re: Parent-Child constraints - 02-14-2011 , 09:45 AM



On Feb 11, 4:17*pm, Art Kagel <art.ka... (AT) gmail (DOT) com> wrote:
Quote:
The self referencing parent/child table is a standard paradigm. *When it
fits the world, there is no reason to shoehorn the world into another
model. *Informix 11.70 even has new syntax and optimization to better
support these kinds of self-referencing relationships.

Art

Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (a... (AT) iiug (DOT) org)
Blog:http://informix-myview.blogspot.com/

Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, orby
inference. *Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.



On Fri, Feb 11, 2011 at 9:16 AM, Tom Lehr <tomc... (AT) gmail (DOT) com> wrote:
Hello All

I am looking for insights, opinions, pros/cons, etc
regarding having a parent id field within a table self referencing
itself to children
within that same table versus setting up another table that houses the
parent ID's
relating back to the other table that houses the children

Thoughts?

Thanks
Tom
_______________________________________________
Informix-list mailing list
Informix-l... (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list
I agree with Art - we used to use this "self-referencing parent/child"
example "back in the day" when teaching the MNO and SQL classes. BOM
explosions are an example of this paradigm in use.

Thanks -
Mark Scranton
The Mark Scranton Group

Reply With Quote
  #5  
Old   
Tom Lehr
 
Posts: n/a

Default Re: Parent-Child constraints - 02-16-2011 , 03:52 PM



All -- - - Thanks much!

Tom

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.