Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
dan_n1122
Starting Member
2 Posts |
Posted - 2008-02-29 : 20:52:01
|
Hello AllThe website I am working on needs to have more than one address per customer and more then one customer per address. This is like a call center for a commercial solicitation. So here is what I have so far. The clients can enter there info on the website or an employee can enter customers info. My questions1 how do I generate a non unique identifier for the same addressIDLink dynamically?2 Is there a better way to setup this DB?Thanks for the help Here is the BD Table#1 CUstomercustomerID PKAddressID FK Name Phone email...Table 2 AddressAddressID PK AdressLinkID COmpany Name streetAddressCity... Table 3INFOInfoID PKEmployeeID FKReasonID FKCustomerID FKInfoDate...Table 4ReasonReseaonID PKQuickReasons.... Table5EmployeeEmployeeID PKEmployeeName.... |
|
dan_n1122
Starting Member
2 Posts |
Posted - 2008-03-02 : 12:14:18
|
I guess no one can help or do you guys (and gals:) not understand my question? |
 |
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2008-03-02 : 12:32:32
|
I am certain we understand the question...but it is far too broad of a topic. Most of us here could probably type all day, or retype information that is readily available on database design basics.You would have a customer table, with Unique ID's.You would also have an address table with unique ID's, but it would include the customer ID related to that address (so 1 customer ID in the address table may have 2 or more unique addresses).You would also have and address TYPE field of some kind (M= Mailing, S= Shipping,B= Billing etc) so that you can easily retrieve the proper address for a customer based on which address you need.You would also keep unique information associated with a customer, such as "CompanyName"...which can be in your 1 row per customer "Customers" table.You would put email addresses somewhere in another table, perhaps a Contact table...presumably you would have multiple contacts for each customer...so that table as well would have the customer ID.Table 2AddressID PK CustomerID streetAddressCityStatezipAddressType Poor planning on your part does not constitute an emergency on my part. |
 |
|
|
|
|