SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Database Design question regarding Normalized Tables


Database Design question regarding Normalized Tables

Author
Message
philcart
philcart
SSCrazy Eights
SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)

Group: General Forum Members
Points: 9953 Visits: 1441
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
MMartin1
MMartin1
SSCertifiable
SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)

Group: General Forum Members
Points: 7361 Visits: 2033
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.

----------------------------------------------------
How to post forum questions to get the best help
john.arnott
john.arnott
Hall of Fame
Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)

Group: General Forum Members
Points: 3656 Visits: 3059
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

TableTonguehoneType
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search