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.

many to many and more

Featured Replies

I have a list of town and some of the need to be linked together. So if I I am viewing town A and town B and C need to be linked to it, I will need to see that A and C belong to B when I am in that record and when I am in C I will need the portal to show me that A and B are related.

So if a town is related to two other towns there would be six relationships in a 'join' file.

A town related to three town would have nine relationships.

How can this been done?

Note I have considered that the records share a common 'join' id but that would be plan B

Towns are in one table so this is a many to many self-relationship. This looks like 2 tables are all that are required. The table Towns and the join table.

A many to many self join would work if you only need to know that they are linked. But if you need to know the mileage between them, or other information about the route, then a Town table and a Route or Link table is necessary.

I've been working on a database for exactly this type of relationship. Below is a TOG of how I have mine linked.

The only difficulty with this, is that the joins are one way. To make a link in the opposite direction requires a little scripting.

Picture-1.gif

Yes, that is what I had in mind. If you script the creation of the record in the join table you could create a second record for the reverse direction. A to B and B to A.

  • Author

It does boil down to scripting but can you imaging when there are 5 or 4 town joined. Thanks guys

No, I can't see what you are trying to do. I can see A joined to B, C, D & E. Each of these is a record in the join file. Are you saying that since A is joined to the other 4 that they must be joined to each other?

Hi,

If they must be linked to each other, then you'd need an another "Universal" ID, and base your relationship upon it.

It is still one relationship though, whatever the number of related records are.

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.