Learner1 Posted July 11, 2007 Posted July 11, 2007 Hi, I have created the tables for my small database (15 tables) . For my many to many tables I have created the join tables but I'm not sure about creating the compond keys (since every tables has to be identified uniquely by the 2 foreign keys from the parent tables. Any suggestions? Thanks in advance ;)
Ender Posted July 11, 2007 Posted July 11, 2007 In general, a join table needs only the two keys corresponding to the parent tables' primary keys. Those would not be compound keys. You could have additional keys (or compound keys) for other secondary relationships into the table, often for filtered relationships. In FM 6 and below, a "compound key" would be a calc with several fields concatonated. FM7 and up, compound keys would be done differently; using the new multi-criteria relationship, you'd have each separate field matched in the relationship definition.
Learner1 Posted July 11, 2007 Author Posted July 11, 2007 I'm not sure I got your point. As I understand, I need the 2 primary keys from the parent tables to identify uniquely the the rows in the join table. So I need to set them as a coumpound key. If I'm wrong please don't hesitate to correct me. This is my first expereince setting a relational Database. and thanks for the help ;)
comment Posted July 11, 2007 Posted July 11, 2007 (edited) Uhm , just in case you wanted to use the compound to ensure uniqueness, see here: http://www.fmforums.com/forum/showpost.php?post/249317/ EDIT: To "identify uniquely the the rows in the join table", let them have an auto-entered serial ID of their own. Edited July 11, 2007 by Guest
Learner1 Posted July 11, 2007 Author Posted July 11, 2007 Thank you Comment, but with a an auto increment serial number as a primary key I wouldn't prevent the duplication of rows with same information from the 2 parent tables :confused:
Learner1 Posted July 11, 2007 Author Posted July 11, 2007 I checked the link, it's clearer now. Thanks ;)
Recommended Posts
This topic is 6403 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