Georgegette Posted September 1, 2002 Posted September 1, 2002 Hello Forum, I'm a beginner working on creating a database for my e-commerce store. I noticed in the sample files that there is a field called a "customer id". Each order placed on my site has a unique order number which is generated by my shopping cart program. What is the advantage of having a unique customer id field when I already have a unique order number? If I have a repeat customer and I don't want to have multiple files of his/her address and other repeat info, yet I want to include in my database that this person has ordered more than once, which direction should I take in terms of designing my database? Thank you, Georgegette
LiveOak Posted September 1, 2002 Posted September 1, 2002 In database parlance "Customers" and "Orders" are different "Entities". If you wanted to email all your Customers, you wouldn't want to use your Order file and send some Customers multiple emails. In terms of "Relationships", each Customer can have many orders, but each order has only one Customer...a one-to-many relationship. Customer numbers are useful in associating Customers with Orders. You don't want to use customer names as they can be the same for two customers (John Smith) or one customer can enter their name as Bob Jones and Rob Jones, yet be the same person. In a commerce site it is useful to track the purchases of customers to say make special offers to your better customers. -bd
Recommended Posts
This topic is 8272 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now