Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Relational Model MOVIES (id, title, yr, score, votes, director) ACTORS (id, name) CASTINGS (movieid, actorid, ord) DIRECTORS(id, name) A movie is described by an

image text in transcribed

1. Relational Model MOVIES (id, title, yr, score, votes, director) ACTORS (id, name) CASTINGS (movieid, actorid, ord) DIRECTORS(id, name) A movie is described by an identifier (integer, key of the table), a title, a year (first release of the movie), a score (average of all votes cast for the movie), a number of votes and a director (integer, foreign key to id in DIRECTORS). An actor is described by an identifier (integer, key of the table) and a name. An actor may play a role in zero to several movies and in a movie we have one to several actors who play in. The ord attribute precise the rank of the actor in the movie. The couple (actorid, movieid) is a key for the table. actorid is a foreign key on ACTORS and movie id is a foreign key on MOVIES. A director is identified by an id (integer, key of the table) and a name 2. Questions to answer in Relational Algebra (algebraic trees) 2.1 Give the movies list (id, title and yr) ordered by title. 2.2 Give the list of movies having score greater or equal to 9. 2.3 Who are the main actors (ord equal to one) of movies released in 2000 ? We want id and name ordered by name. 2.4 Do the cartesian product between MOVIES and CASTINGS. 2.5 Give the id of movies released before 1930 or having actor's id 12 in their casting. 2.6 Give the names of stars (actors with ord equal to one) of the movie having id 11, in alphabetical order. 2.7 Give the names of directors of movies released before 1970 and having 'the' in their title. 2.8 Give the id and title of movies having no actors in their casting

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

Students also viewed these Databases questions

Question

What could motivate staff to participate?

Answered: 1 week ago