Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Database Design question regarding Normalized Tables Expand / Collapse
Author
Message
Posted Saturday, February 16, 2013 9:10 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Sunday, July 20, 2014 9:06 PM
Points: 2,693, Visits: 1,202
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
Post #1420939
Posted Sunday, February 17, 2013 12:22 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 6:23 PM
Points: 312, Visits: 816
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.
Post #1421000
Posted Monday, February 18, 2013 5:09 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Sunday, April 27, 2014 6:26 AM
Points: 1,521, Visits: 3,036
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.

Post #1421383
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse