|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 5:53 AM
Points: 2,692,
Visits: 1,074
|
|
mmartin1 (2/15/2013) So in your model, if I got a new cell phone and number , you would need to create a new entry for me. Do you know for a fact that this possibility doesn't exist? I don't see the disadvantage of normalising the database in contrast to the risk of defeating the purpose of a rdms.
@mmartin1 which model are you referring to?
Hope this helps Phill Carter -------------------- Colt 45 - the original point and click interface 
Australian SQL Server User Groups - My profile Phills Philosophies Murrumbeena Cricket Club
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 4:43 PM
Points: 192,
Visits: 640
|
|
| I refer to the 1:1 between an entity and a phone number. The OP refers to a store. If I wanted to reach a certain number of the store that goes directly to a manager, dialing direct and waiting on hold a few minutes (example) would be less ideal. This design can only capture one number.
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Wednesday, April 17, 2013 10:57 PM
Points: 1,491,
Visits: 3,008
|
|
Steven Willis (2/3/2013) Considering something like Contact Info I'd do something like below. . . . . I'll say again: this is a very simplified model. What actually needs to go in the various tables is always based on the needs of the application.
. . .
--All of these tables allow for adding a new 'type' at any time or changing the description of a 'type'
Table:AddressType AddressTypeID AddressType -- shipping, mailing, home, office, vacation house, etc AddressTypeDesc --optional for allowing longer descriptions
--Could be Customer, Agent, Relative, etc Table:ContactType ContactTypeID ContactType ContactTypeDesc
Table:PhoneType PhoneTypeID PhoneType --home, cell, office, fax, etc PhoneTypeDesc
. . . .
--I like to use a cross-reference table because you can sometimes have more than 1 contact at the same address --as well as multiple addresses per contact Table:ContactAddress ContactID AddressID
--For the same reason as addresses Table:ContactPhone ContactID PhoneID Lots of great stuff here. I would suggest that what's called a "cross-reference" table is really an "associative" table to relate entities (client to address, client to phone). Another good value of associative tables, besides allowing multiple clients (family members, for instance) to share an address or phone, is to define the nature of the relationship itself. So, for the Client-To-Address association, you'd have a column to distinguish perhaps Home from Work or Mail. This may, in fact, be what was intended by the various "Type" columns; if an address is shared by two clients, it could be home for one but just mail for another (think college student and parent, perhaps), so you'd want the type specified in the association.
|
|
|
|