Entity data spread over multiple tables

From: John O'Conner <jsoconner_at_earthlink.nospam.net>
Date: Sun, 25 Jan 2004 10:14:22 GMT
Message-ID: <2GMQb.26802$zj7.13126_at_newsread1.news.pas.earthlink.net>



Hi all,

In my Little League db, PARTICIPANTS have 0, 1, 2, or 3 different PHONE numbers. I've modeled this by creating a separate PHONE table containing a number, phone type, and participant id.

Is this the typical design for attaching 0 or more of the same attribute to an entity? I see the benefit being that no PHONE columns are used when a PARTICIPANT doesn't have one...with the downside that PHONE is a separate table, and I have to access a second table to collect all info for a single PARTICIPANT. Actually, I have several different tables with pieces of a PARTICIPANTS identity. Placing data about a single entity in other tables must be a known, common situation with anthing but trivial databases, right?

This rubs me a little funny because I would model this differently in a programming language like Java. I would probably make PHONE an array within PARTICIPANT classes. The array could contain 0 or more actual PHONE instances. The PHONE info is right there with the PARTICIPANT object in the programming language...however, my db model is quite different. Bothersome....do other people hit this type of modeling problem often? Is this a common db design pattern?

Regards,
John O'Conner Received on Sun Jan 25 2004 - 11:14:22 CET

Original text of this message