Jump to content

1 to many?


MnR

This topic is 7019 days old. Please don't post here. Open a new topic instead.

Recommended Posts

hi,

I want to stop using repeats in order to get lots of data to 1 customer. How would i set up a relationship ( 1 to many ) between a tbl_customers and tbl_orders.

So that a customer can have many orders?

Link to comment
Share on other sites

Customer would have a primary key Customer_ID. Order would have a primary key Order_Number and a foreign key Customer_ID. You may want to go one more step. OrderLine with a primary key Line_Number and a foreign key Order_Number.

The relationship between Customer & Order is based on Customer_ID. The relationship between Order & OrderLine is based on Order_Number.

Link to comment
Share on other sites

This topic is 7019 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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