Re: baseball league db design

From: Karel Miklav <karel_at_inetis.spppambait.com>
Date: Fri, 23 Jan 2004 13:25:51 +0100
Message-ID: <Ao8Qb.1912$%x4.322559_at_news.siol.net>


John O'Conner wrote:
> Now my question...what should PARTICIPANT contain? Obvious candidates
> are first/last names, an address id, phone, fax, and email addresses for
> contact information. However, the young players will eventually have
> much more information like position, birthdate, team assignment, number,
> maybe some other stats. It doesn't seem right to put those in the
> PARTICIPANT table since not all participants will use those fields. Now
> I'm thinking that maybe I need to treat players differently from other
> particpants...in a separate table perhaps.

Try this:

   participant (id, name, address, ...)
   coach (id, team_id, ...)
   player (id, team_id, coach_id, ...)
   manager (id, team_id, ...)

All common data is stored in the 'participant' table, then there is a specialized table for each role. When you store the data for a role, you update 'participant' and another corresponding table, and they are of course linked by the same id. Sounds reasonable?

Regards,
Karel Miklav Received on Fri Jan 23 2004 - 13:25:51 CET

Original text of this message