MnR Posted January 29, 2005 Posted January 29, 2005 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?
RalphL Posted January 29, 2005 Posted January 29, 2005 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.
transpower Posted January 29, 2005 Posted January 29, 2005 You could go still further and have a Product table as well. See chapter 7 of Stars' Learn FileMaker Pro 7.
MnR Posted January 30, 2005 Author Posted January 30, 2005 Thanks guys but i realised using a portal related to orders with only 5 rows limits each customer!
RalphL Posted January 30, 2005 Posted January 30, 2005 Add a scroll bar to the portal. That is the beauty of using related records, you can have as many as you want.
Recommended Posts
This topic is 7294 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