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.

Duplicating portal records

Featured Replies

On my layout, in addition to fields from the current table (Music), are two portals with related records (Trcks). I want to duplicate the entire record (Music) AND include contents of the two portals. 

(The layout is for example, an album with the tracks. have two (or more) copies and realize it's better to have separate records over a field indicator. The Music Table contains info on the album, the Tracks Table of the various tracks and time shown in the portal.)

2 hours ago, Raizel said:

it's better to have separate records over a field indicator

Why is it better? What advantage would be gained by having the same information stored in more than one place?

As a rule, a relational database avoids duplication of data. That way any changes to data only need to be entered once. This may seem less critical in your example, where the data is not expected to change much - but just think of a case where you have 5 copies of an album and you discover an error in the entry of one of the tracks.

 

  • Author

Understandable. But not sure then how to record having 2 copies of an album, meaning 2 copies of each song. If I then have another album with one of the songs, I have 3 copies of one song. That's my aim -- getting the 3.

If an album can have more than one song, and one song can appear on more than one album, then you have a many-to-many relationship between albums and songs, and you need to resolve it by using a third table to join the two - something like:

Albums -< Tracks >- Songs

where the Tracks table has fields for:

  • AlbumID
  • SongID
  • TrackNumber
  • Side

Then it's easy to determine the total number of copies of a song by summing the quantities of the related albums.

 

  • Author

I do have a join table "Tracks". Will change fields and SUM accordingly. Appreciate the input.

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.