Here's a design question similar to the current threads on normalization
issues.

Suppose I have three types of contact information I want to keep track of:
Postal address, phone, and email.  The design is that any given entity
that has contacts info associated may have zero or more of each.

I also have many types of entities which may have contact info.
Individual people, businesses, departments within businesses, and so
forth.  These differ sufficiently that each gets its own table.

The only way I can see to handle the contactable-entity-to-contacts
mappings is to have M times N association tables, where M is the number of
contact types and N the number of contactable entity types.  So you'd have
tables like PERSON_EMAIL, BUSINESS_POSTAL, and so forth, each just
relating 1 of the first part to 0..N of the second.

However, this design leads to an explosion of those 'join tables'.  If I
have four contact types (say I add 'url') and five contactable entity
types, I end up with 20 join tables!  I can obviously do this, but I can't
help thinking I'm missing some way to simplify this design.

So...any suggestions?

<topical check food>query sql</topical check food>

-- 
   |   Craig Berry - http://www.cine.net/~cberry/
 --*--  "When resolving office conflicts, remember the wisdom of
   |   Mahatma Gandhi: If enough peasants die horribly, someone
       will probably notice." -- The Onion




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to