Question: Use MySQL or Postgres to answer please. movies ((mid: integer, title: varchar, year: date, rating: real, num_ratings: integer)) actors (mid: integer, name: varchar, cast_position: integer)

 Use MySQL or Postgres to answer please. movies ((mid: integer, title:

varchar, year: date, rating: real, num_ratings: integer)) actors (mid: integer, name: varchar,

Use MySQL or Postgres to answer please.

movies ((mid: integer, title: varchar, year: date, rating: real, num_ratings: integer)) actors (mid: integer, name: varchar, cast_position: integer) genres (mid: integer, genre: varchar) tags (mid: integer, tid: integer) tag_names (tid: integer, tag: varchar) (1) We will now write some queries for a Content-Based Movie Recommendation Sys- tem such as NetFlix. In reality, the accuracy of the recommendations is so important that NetFlix, for instance, offered a prize of one million dollars for the first algorithm that could beat its own recommendation algorithm by 10%! The prize was finally won in 2009, by a team of researchers called "Bellkor's Pragmatic Chaos." However, in this project we shall deploy a simple algorithm that may or may not produce optimal recommendations. Content-based recommendations focus on the properties of items, in our case movies. The similarity of two movies is determined by measuring the similarity of their properties. For a movie item, we shall consider the following five properties: actors, tags, genres, year, and rating Given two movies X and Y, the similarity of Y to X, sim(X,Y), can be computed as: fraction of common actors + fraction of common tags + fraction of common genres + age gap + rating gap where fraction is the number of common elements between X and Y divided by the number of elements of X, age gap is the normalized difference between the production years of X and Y, and rating gap is the normalized difference between the ratings of X and Y. Intuitively, the smaller the gaps are, the better (since movies of the same decade and rating are more likely to be similar). Moreover, note that we divide by five because each property is given an equal weight of 1. Given a user who is known to like the movie 'Mr. & Mrs. Smith', write a query that prints the movie title, rating, and similarity percentage (i.e., similarity x 100) for the top 10 movies that are most similar to the 'Mr. & Mrs. Smith' movie, ordered by the similarity percentage. movies ((mid: integer, title: varchar, year: date, rating: real, num_ratings: integer)) actors (mid: integer, name: varchar, cast_position: integer) genres (mid: integer, genre: varchar) tags (mid: integer, tid: integer) tag_names (tid: integer, tag: varchar) (1) We will now write some queries for a Content-Based Movie Recommendation Sys- tem such as NetFlix. In reality, the accuracy of the recommendations is so important that NetFlix, for instance, offered a prize of one million dollars for the first algorithm that could beat its own recommendation algorithm by 10%! The prize was finally won in 2009, by a team of researchers called "Bellkor's Pragmatic Chaos." However, in this project we shall deploy a simple algorithm that may or may not produce optimal recommendations. Content-based recommendations focus on the properties of items, in our case movies. The similarity of two movies is determined by measuring the similarity of their properties. For a movie item, we shall consider the following five properties: actors, tags, genres, year, and rating Given two movies X and Y, the similarity of Y to X, sim(X,Y), can be computed as: fraction of common actors + fraction of common tags + fraction of common genres + age gap + rating gap where fraction is the number of common elements between X and Y divided by the number of elements of X, age gap is the normalized difference between the production years of X and Y, and rating gap is the normalized difference between the ratings of X and Y. Intuitively, the smaller the gaps are, the better (since movies of the same decade and rating are more likely to be similar). Moreover, note that we divide by five because each property is given an equal weight of 1. Given a user who is known to like the movie 'Mr. & Mrs. Smith', write a query that prints the movie title, rating, and similarity percentage (i.e., similarity x 100) for the top 10 movies that are most similar to the 'Mr. & Mrs. Smith' movie, ordered by the similarity percentage

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!