Reference no: EM133246008
Consider the following Schema.
Actor (aId: integer, aName: char, dob: date, phone: integer, email: varchar, address: varchar)
Movie (mId: integer, title: char, startDate: date, endDate: date, releaseDate: date, cId: integer, cost: integer)
Cast (mId: integer, aId: integer, role_name: char)
Category (cId: integer, name: char, type: char)
Write down the following Queries in SQL.
1. Find the names of actors who have worked in Titanic movie. (Titanic is the title of movie)
2. Find the minimum cost of the movie whose names starts with 'A'.
3. Find the names of those movies which belong to non-animated movies. (non-animated movies is the Category of movie)
4. Find the aIds of actors who have been casted in some romantic or some action movies. (romantic and action is the title of movie)
5. Find the aIds of actors who worked in some comedy and some adventurous movies. (comedy and adventurous is the title of movie)
6. Find the name of top 10 actors which have been casted maximum no. of times.
7. Create a view to find the name & no. of movies for each category type.
8. Create a view which print the names of actors who have been casted in romantic movies or are at 44 Street 12 Avenue.
b) Write down the following Queries in relational algebra.
1. Identify all movies who fell in all categories.
2. Produce a status report on actors casted.
c) Privileges are granted by user "Alex" in the given schema of a relational database to users "Bob" and "Mary"