Write model into different schema

Hello.

For instance, say I have two models: playlists, and movies.

Playlists would contain a list of playlists, with id and name fields. The movies would contain a list of all the users movies.

Now I need another model that saves to a column in the database with a name of say “playlist_id” where id is the id of the playlist.

I would want to use the same movies model to write rows into the individual playlists tables.

When I want to get the contents of an individual playlist, id use a playlist id from the playlist table and then accessing the playlist_id table would give me all of the movie data contained in that table.

How would I go about designing this?
Thank you.

What you are describing is a relational database.

You can hack on it for a while in the hope of personally rediscovering the past 50 years of RDBMS (Relational Data Base Management Systems) or you can study relational databasing on the web or thru books.

If you choose to learn from a book, read anything by C. J. Date

1 Like

Couldn’t remember what the name was for what I was looking for. You’ve got me on the right track.

Cheers!

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.