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.

Help with relation scheme

Featured Replies

  • Newbies

Hi, I got stuck with building a proper relationship scheme.

I'm making an database with several tables. One table contains information on archaeological features (key field Feature ID), another contains data on documentation. One document may contain information on several features, for this reason in documentation table I've created several fields (Feature ID 1, Feature ID 2, etc). The two tables are related through Feature ID=Feature ID 1; in the second table I've made a self-relation between all Feature ID fields.

In the Features layout I've made a portal displaying related records from Documentation table. Unfortunately it only displays related to the first field (Feature ID 1), while other fields (Feature ID 2, etc) seem remain unrelated. 

What do I do wrong? Thank you!

5 minutes ago, Sergej Ivanov said:

One document may contain information on several features,

How about the other way? Can one feature be related to several documents?

  • Author
  • Newbies

I thought of it - but then I'll have the same problem, as I would need statistics for the documents - which features they describe

This doesn't answer my question. I am not asking about the problems you might have, but about the real-world scenario: can there be more than one document describing the same feature?

  • Author
  • Newbies

I am sorry - yes. Normally there's around 20 documents describing a feature, and each document may contain information on up to 20 features

Well, then you have a many-to-many relationship - and the proper way to resolve it is through a join table. See a basic demo of a join table here:
http://fmforums.com/topic/50942-portal-grouping-problem/?do=findComment&comment=239210

Note:
In some cases, you may use a multi-key field in one of the tables instead of a join table. For example, you could use a checkbox field in the Documents table to tick off all the features that the document describes. But there are severe limitations to this method: mainly, you cannot record any attributes of a specific join - for example, the page on which this feature is described in this document. You also won't be able to produce a proper report of documents by feature, or features by document.

  • Author
  • Newbies

Now it works. Thank you!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.