Subject Re: [firebird-support] Re: DB design
Author Gabe Martin
What about this,

Since both parents and players are people you create a general table
Like so:
PERSON
PersonID
FirstName
LastName
SurName
Sex
ContactID (links to Contact Table)

Then you can seperate out players and parents (or contacts) via:
PLAYER_RELATIONSHIPS
PlayerID (link to PERSON.PersonID)
ContactID (link to PERSON.PersonID)
Relationship

If there was other information you wanted to maitain about specific
players you could add another table like so:
SOCCERPLAYER
PersonID
Position
NumberOfGoals
etc..

This is in addition to a CONTACT table which has all the normal
contact fields as well as a
CONTACT
Address
Suburb
State
etc..

The reason why you would want to have the ContactID in the Person
table instead of vise versa is because you will probably have many
people (kids and parents) who have the same address.

Just an idea.

On 7/27/05, Martijn Tonies <m.tonies@...> wrote:
> Hi,
>
>
> > Thanks for your fast response.
> >
> > Do you think if we set-up a table named contacts, containing,
> > name_id
> contact_id
> > firstname
> > surnmae
> > dateofbirth
> >
> > Above table would contain names for players, mother and father. Then
> > somehow, create another table to link player with mother and father.
> > Is it possible?
>
> The do:
>
> PLAYER
> --
> PlayerID (link to Contact.ContactID)
>
> PARENTS
> --
> ParentID (link to Contact.ContactID)
>
> PLAYER_PARENTS
> --
> PlayerID (link to PLAYER.PlayerID)
> ParentID (link to PARENTS.ParentID)
>
> 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
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>