Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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 ;)

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.

  • 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 ;)

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 by Guest

  • 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:

That's what the first part of my post was about.

  • Author

I checked the link, it's clearer now. Thanks ;)

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.