Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions: For this assignment you must submit a document file (in pdf, txt or doc format) with answers to the following questions. Consider the MOVIES

image text in transcribed

image text in transcribed

Instructions: For this assignment you must submit a document file (in pdf, txt or doc format) with answers to the following questions. Consider the MOVIES relational database schema description: A movie can have 0 or more actors A movie can have 1 or more categories A movie has 1 and only one language Rating is one of these values: 'G','PG',PG-13','R','NC-17' People can comment about the movies in a webpage, and the comments are stored in the comments table. The reviewer_name is introduced by the person on each comment, so we don't have a table with "reviewers". A reviewer can create any number of comments about a movie The comments will have a score about the movie with values from 0 to 100. Note, the last update fields are going to be stored as a "timestamp". IMPORTANT: 2 entries in the same relation can have the same lastupdate, so, for example, 2 movies can have the same lastupdate value. The relations are: ACTOR (actor_id, first_name, last_name, last_update) LANGUAGE (Ilanguage_id, name, last_update) CATEGORY (category_id, name, last_update) FILM (film_id, title, description, release_year, language_id, length, rating, last_update) FILM_ACTOR(actor_id, film_id, last_update) FILM_CATEGORY (film_id, category_id, last_update) COMMENTS (review_id, film_id, reviewer_name, comment, score, last_update) 1. (10 points) Write appropriate SQL DDL statements (CREATE statements) for declaring the above described relational database schema. Specify the keys and referential triggered actions. 2. (5 points each) Write the following queries in MYSQL, using the schema provided above

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

More Books

Students also viewed these Databases questions

Question

Address an envelope properly.

Answered: 1 week ago

Question

Discuss guidelines for ethical business communication.

Answered: 1 week ago