3. Consider the following schema for a movie database (the primary keys of the tables are...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
3. Consider the following schema for a movie database (the primary keys of the tables are underlined). Foreign key constraints are also listed under the schema of each table. Person (ID, FirstName, LastName, Birthdate) Movie (ID, Title, Release Year, Director) Movie(Director) references Person(ID) Acts (ActorID, MovieID) Acts(ActorID) references Person (ID) Acts(MovieID) references Movie(ID) 4. For this question, you will use the same database schema as in the previous question. Assume that the Director attribute in the Movie table is not null (i.e., every movie must have a director). Assume the number of rows in each table are as follows: Person (200 rows), Movie (150 rows), and Acts (1000 rows). For each of the SQL query given below: • Explain (in plain English) what the query tries to return. How many columns are there in the query result? What is the minimum and maximum number of possible rows that may appear in the query result? (a) SELECT Title FROM Movie WHERE Release Year = 2017; (b) SELECT P.First Name, P.LastName FROM Person P, Movie M; WHERE P.ID M.Director AND M.Title= 'Star Wars'; (c) SELECT P.LastName, P.FirstName FROM Person P, Movie M, Acts A WHERE P.ID = A.ActorID and M.ID = A.MovieID and M.Director = P.ID; (d) SELECT DISTINCT P.FirstName, P.LastName FROM Person P, Acts A1, Acts A2 WHERE P.ID = A1.ActorID and P.ID = A2.ActorID and A1.MovieID A2.MovielD; 3. Consider the following schema for a movie database (the primary keys of the tables are underlined). Foreign key constraints are also listed under the schema of each table. Person (ID, FirstName, LastName, Birthdate) Movie (ID, Title, Release Year, Director) Movie(Director) references Person(ID) Acts (ActorID, MovieID) Acts(ActorID) references Person (ID) Acts(MovieID) references Movie(ID) 4. For this question, you will use the same database schema as in the previous question. Assume that the Director attribute in the Movie table is not null (i.e., every movie must have a director). Assume the number of rows in each table are as follows: Person (200 rows), Movie (150 rows), and Acts (1000 rows). For each of the SQL query given below: • Explain (in plain English) what the query tries to return. How many columns are there in the query result? What is the minimum and maximum number of possible rows that may appear in the query result? (a) SELECT Title FROM Movie WHERE Release Year = 2017; (b) SELECT P.First Name, P.LastName FROM Person P, Movie M; WHERE P.ID M.Director AND M.Title= 'Star Wars'; (c) SELECT P.LastName, P.FirstName FROM Person P, Movie M, Acts A WHERE P.ID = A.ActorID and M.ID = A.MovieID and M.Director = P.ID; (d) SELECT DISTINCT P.FirstName, P.LastName FROM Person P, Acts A1, Acts A2 WHERE P.ID = A1.ActorID and P.ID = A2.ActorID and A1.MovieID A2.MovielD;
Expert Answer:
Answer rating: 100% (QA)
A It will printDisplay the titles from the Movie table which is Release Year is 2017 It will Display ... View the full answer
Related Book For
Database Systems Design Implementation and Management
ISBN: 978-1285196145
11th edition
Authors: Carlos Coronel, Steven Morris
Posted Date:
Students also viewed these programming questions
-
In the previous problem, assume that p = 1 − p. (a) Show that under either service convention, the first player will win more often than the second player if and only if p > .5. (b) In...
-
For the production line in the previous problem, assume that a single AGV train consisting of a tractor and multiple trailers are used to make deliveries rather than separate vehicles. Time required...
-
In the previous exercise assume that the process is centered so that the mean is 90 millimeters and the standard deviation is 0.1 millimeter. Suppose that 10 cases are measured, and they are assumed...
-
Dalmo Bhd is an investment holding company and currently it has 3 subsidiaries as stated below. Dalmo Bhd group of companies financial year end is 31st March. The shareholding structure of Dalmo...
-
On July 1, 2012, Nicholsen Corporation issued $300,000 of bonds, with a 13% stated rate of interest, for $318,000. The bonds pay interest semiannually on each January 1 and July 1 and are to be...
-
For the statement of Problem 1: (a) Determine the dollar value of the consumer surplus before and after the imposition of the tariff. (b) Of the increase in the revenue of producers with the tariff...
-
Kronenberger Burgoyne, LLP, was a law firm with two equity partners who agreed to equal ownership as of 2009. Before 2009, Kronenberger had owned a majority interest in the firm, and when, in 2011,...
-
(Kellogg's) acquired 75% of the outstanding stock of Wholesome & Hearty Foods ("Wholesome") at the end of 2007, for cash and stock totaling $120 million. Assume that Wholesome's assets and...
-
Research Web-based database technologies and identify a database management system (other than SQL Server, MySQL, or Oracle) that is used to deploy applications to the Web and the cloud. Discuss the...
-
Create a star schema for this case study. How did you handle the time dimension? Fitchwood Insurance Company, which is primarily involved in the sale of annuity products, would like to design a data...
-
What is the output of the following statements? int a=2; float b=3.5; int c=a; printf("%d",c)
-
Seventeen percent of U.S. residents are in their thirties. Consider a group of eight U.S. residents selected at random. Find the probability that at least five of the people in the group are in their...
-
Question 1 Explain what industry, media and government organisations, events and communication channels are relevant to the organisation. Answer: Question 2 What are the major principles of...
-
1. Select three (3) of the isometric views below and draw the necessary multiview drawings of the following objects using 3rd-angle projection. Your drawings should be properly proportioned. You do...
-
A parallel-plate capacitor is formed of two plates, with both sides L = 13.0 cm and spaced d= 9.50 cm apart. The plates are charged to 4.80 nC. What is the potential difference across the plates?
-
How do decision-making frameworks, such as the Vroom-Yetton-Jago model or the Cynefin framework, assist leaders in selecting appropriate decision styles and approaches based on situational factors,...
-
Hang Ten produces sports socks. The company has fixed expenses of $110,000 and variable expenses of $1.10 per package. Each package sells for $2.20. The number of packages Hang Ten needed to sell to...
-
After Theorem 1.5 we note that multiplying a row by 0 is not allowed because that could change a solution set. Give an example of a system with solution set S0 where after multiplying a row by 0 the...
-
What are the four ANSI transaction isolation levels? What type of reads does each level allow?
-
David Suker, the inventory manager for a marketing research company, wants to study the use of supplies within the different company departments. Suker has heard that his friend, Ephanor, has...
-
For each table, identify the primary key and the foreign key(s). If a table does not have a foreign key, write None in the space provided.
-
Consider the unitary operator \(e^{i \hat{A}}\), with \(\hat{A}\) Hermitian and acting on function space. Can it be diagonalized? If so, write an expression for its diagonal elements.
-
Is a real function of a Hermitian operator \(\hat{A}, f(\hat{A})\), also Hermitian? Give examples.
-
Is the square of the "delta function" a distribution? If so, prove it using Dirac's bra-ket notation.
Study smarter with the SolutionInn App