Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Why a unique customer id field?

Featured Replies

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

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

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.