Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

movie cast actor act id mov id role integer integer char (30) Y act id act fname act Iname act gender integer char (20) char

image text in transcribed
image text in transcribed
movie cast actor act id mov id role integer integer char (30) Y act id act fname act Iname act gender integer char (20) char (20) char (1) genres gen_id gen_title integer char (20) director dir id dir name dir name movie movid integer mov Utle char (50) mov year integer mov time mov lang char (50) mov direl date mov_rol country char (5) integer char (20) char (20) integer movie genres movid gen id integer movie direction rating Integer revid Integer rev stars integer num_o_ratings integer dir Id revid integer integer integer char (30) mov id rey name 2. Write the SQL queries for the following items, considering the SQL Optimization Techniques studied in classes. a. List all the actors who have not acted in any movie between 1990 and 2000. b. Find how many movies are there in each genre. C. Consider the following four queries specified on Movie database: SELECT A act_Iname FROM actor A, movie_cast C, movie M WHERE M.mov_title = 'Titanic' AND M.mov_id - C.mov_id AND A.act_id = c.act_id AND A.act_gender ='M' movie cast actor act id mov id role integer integer char (30) Y act id act fname act Iname act gender integer char (20) char (20) char (1) genres gen_id gen_title integer char (20) director dir id dir name dir name movie movid integer mov Utle char (50) mov year integer mov time mov lang char (50) mov direl date mov_rol country char (5) integer char (20) char (20) integer movie genres movid gen id integer movie direction rating Integer revid Integer rev stars integer num_o_ratings integer dir Id revid integer integer integer char (30) mov id rey name 2. Write the SQL queries for the following items, considering the SQL Optimization Techniques studied in classes. a. List all the actors who have not acted in any movie between 1990 and 2000. b. Find how many movies are there in each genre. C. Consider the following four queries specified on Movie database: SELECT A act_Iname FROM actor A, movie_cast C, movie M WHERE M.mov_title = 'Titanic' AND M.mov_id - C.mov_id AND A.act_id = c.act_id AND A.act_gender ='M

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_2

Step: 3

blur-text-image_3

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

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

Students also viewed these Databases questions

Question

Define passive listening.

Answered: 1 week ago

Question

1. Why do people tell lies on their CVs?

Answered: 1 week ago

Question

2. What is the difference between an embellishment and a lie?

Answered: 1 week ago