If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Modelling question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-10-11, 06:46
jimk100189 jimk100189 is offline
Registered User
 
Join Date: Jan 2011
Posts: 1
Modelling question

I am new to DB design and MYSQL (using MYSQL workbench for 1st time) and trying to model a simple family tree DB. Each member of my family has contact info, and a tree of relationships. Any suggestions on how to approach the design?

(I'm NOT a database designer, obviously), although I have some old (10+ years ago) DB2, Oracle exposure
Reply With Quote
  #2 (permalink)  
Old 01-10-11, 12:15
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
The "simple" family tree is actually one of the more difficult relationships to model.

At its most basic, you are going to need a table of Persons, a table of RelationshipTypes, and a table of PersonRelationships that implements a many-to-many self-join on the Persons table.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
Reply With Quote
Reply

Tags
mysql, mysql workbench

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 On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On