Skip 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.

How to include several records from a table into one field on another table?

Featured Replies

Hi!

I have this project for my class that involves me creating a movie database. The database has table for the movies and actors, now my problem comes in when I want to associate the movies with the actors, because the movies have more than one actor I don't know how to implement the movies table so it accepts more actors. Do I need to make fields for every actor in the movie? Because this would set a limit to the number of actors, or can I include all the associated actors in one field in the movie table?

Any help is greatly appreciated, thanks.

Andy

Hi Andy,

You need a join table between Movie and Actor, so that you can remember multiple Roles for each Actor. In the attached ER diagram, I show a Member table instead of Actor, as this general term could be used for anyone working in the Movie biz. You could use this same structure to track Directors, Producers, and other members of the production crew.

Movie.GIF

  • Author

Thank you for taking the time to assist me in this mannor. However, I am still uncertain of what I should input into the "cast" field under the movie table if I want to associate multiple actors, would I'm using the actors's ID as reference to the actor's table, so would I for example input several actors as: 1,5,7,5 : or what would I input into the field?

Thanks for any further assitance.

Andy

P.S. btw, thanks for the diagram as well.

Edited by Guest

The Movie table would not have a field for Actor or Actor ID. That's the point of the join table. The Role table holds the ID of both the Member (Actor) and the ID of the Movie, thus joining the Member with the Movie.

  • Author

Oh, I see it now. Alright, thanks for all your help

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.