MnR Posted January 29, 2005 Share 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? Link to comment Share on other sites More sharing options...
RalphL Posted January 29, 2005 Share 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. Link to comment Share on other sites More sharing options...
transpower Posted January 29, 2005 Share 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. Link to comment Share on other sites More sharing options...
MnR Posted January 30, 2005 Author Share Posted January 30, 2005 Thanks guys but i realised using a portal related to orders with only 5 rows limits each customer! Link to comment Share on other sites More sharing options...
RalphL Posted January 30, 2005 Share 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. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6627 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