Question: a) [1 pt] Import data (SQL code is provided. Test prog3_createTable.sql on your server): Each of you will work in your own database with the

a) [1 pt] Import data (SQL code is provided. Test prog3_createTable.sql on your server): Each of you will work in your own database with the name cs4402xx; Import the movie data movie-name_score.txt into a new table called movies with the schema: movies(movie_id integer, name varchar(1000), score integer)

Import the movie cast data at movie-cast.txt into a new table called cast with the schema:

cast(movie_id integer, cast_id integer, cast_name varchar(1000)).

j) [10 pt] Finding good collaborators: Create a view (virtual table) called good collaboration that lists pairs of stars who appeared in movies. Each row in the table describes one pair of stars who have appeared in at least 4 movies together AND each of the movie has score >= 75. The view should have the format: collaboration (cast_member_id1, cast_member_id2, num_movies, avg_movie_score). Exclude self pairs: (cast_member_id1 == cast_member_id2). Keep symmetrical or mirror pairs. For example, keep both (A, B) and (B, A). Hint: Self-Joins will likely be a necessary. After creating a view, list (cast_member_id1, cast_member_id2, num_movies, avg_movie_score) sorted by average movie scores from the view.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!