Question: Produce a SQL query to form a junction table called movies_actors . A junction table is basically a table that contains foreign keys of
Produce a SQL query to form a junction table called "movies_actors". A junction table is basically a table that contains foreign keys of different tables together so that they form transaction table. This table have 2 variables only (movie_id and actor_id). The features of these variables (that should be considered while creating these variables) are provided below. As can be seen, a sample is given (below) from the "movies_actors" table.
- movie_id isnumeric that has the "integer" typing and is a foreign key that should be referenced to the movie_id from the movies table.
- actor_id isnumeric that has the "integer" typing and is a foreign key that should be referenced to the actor_id from the actors table.
- Finally, note that both columns are the primary keys of this newly created table.
Step by Step Solution
3.46 Rating (153 Votes )
There are 3 Steps involved in it
To create a junction table named moviesactors with two columns movieid ... View full answer
Get step-by-step solutions from verified subject matter experts
