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.

zero-to-many self-join?

Featured Replies

Hi,

How would you conceptualize a zero-to-many self-join?

In my case, I need to create a database that contains cities.

Some cities have boroughs others none and some boroughs have areas and others none.

Do I create three distinct tables or I create a single table with a parent field in it?

This is a very tricky subject. What you have essentially is a location which can be comprised of other locations, which in turn can be comprised of still more locations. It's a recursive data structure and they're easy to implement but difficult to work with in FMP, typically because layouts aren't dynamic.

Depending on what you want to do with these locations, you can either create specific tables for each location type, or you can use a single table and configure a recursive relationship between the table and itself.

Using some of the techniques available elsewhere you can present recursive data structures as a collapsable tree structure.

  • Author

To this structure, I will attach a street table which can belong to one of the three entities (city, borough or area).

The maximum number of recursion is 3.

I already developed the structure with 3 different tables a few years ago, but the problem is that when a city was by itself, I needed to replicate the record in the borough table and the area table so the street would be attached to the right city. In FM 8, it was quite awkward for the user. Now with FM10, it could be different with the event handling.

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.