July 11, 200718 yr 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 ;)
July 11, 200718 yr 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.
July 11, 200718 yr Author 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 ;)
July 11, 200718 yr 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, 200718 yr by Guest
July 11, 200718 yr Author 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:
Create an account or sign in to comment