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...
-
A negative relationship is observed between women's labor force participation and fertility. Is higher labor force participation the cause of the lower birthrate, or vice versa? Discuss.
-
Determine whether the following sequences converge or diverge and describe whether they do so monotonically or by oscillation. Give the limit when the sequence converges. {2" 3"}
-
The stockholders' equity section of Light Corporation's balance sheet at January 1 follows: The following transactions affecting stockholders' equity occurred during the year: Jan. 8 Issued 30,000...
-
The bookkeeper for Geronimo Company has prepared the following balance sheet as of July 31, 2008. The following additional information is provided. 1. Cash includes $1,200 in a petty cash fund and...
-
The Shoe For You Company manufactures two types of shoes; dress and casual shoes. For the month of May, the company plans to produce 18,500 pairs of dress shoes and 18,000 pairs of casual shoes. Both...
-
Brindon Thayn, president and owner of Orangeville Metal Works, has just returned from a trip to Europe. While there, he toured several plants that use robotic manufacturing. Seeing the efficiency and...
-
A sales manager wants to see the effect between employee work experience and car sales. Following are the data of PT Mobilindo employees in 2019. Employee Work Experience (years) Car Sales (unit) 1 1...
-
A system is described as follows: where What restrictions should be imposed on 1 , 2 , 1 1 , 2 , 1 and 2 2 so that the system is completely controllable and observable. x y = Ax + Bu = Cx
-
Let X t = b t + W t + Z t X t = b t + W t + Z t where W W is a Brownian motion and Z t = N t k = 1 Y k Z t = k = 1 N t Y k a ( , F ) ( , F ) -compound Poisson process independent of W W . The...
-
There is a growing list of publicly available online resources for consolidated banking statistics and macroeconomic data, including: BIS statistics, Bank for International Settlements, available at...
-
Show that (12.20) gives the momentum content of \(R(\phi)\left|\boldsymbol{p}_{0} ight angle\). Data from Eq. 12.20 PR() Po) = R()\Po) Pk-
-
The people of Foodland have 40 hours of labor a day to bake pizza and bread. Table 1 shows the maximum quantity of either pizza or bread that Foodland can bake with different quantities of labor. Can...
-
Hello, help me find an example of a business that failed with ERP implementation. describe the company, Why did they fail and How do they deal with the issue. What is the key lesson to learn from...
-
Suppose that A is an m n matrix with linearly independent columns and the linear system LS(A, b) is consistent. Show that this system has a unique solution.
-
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.
-
Prove the following inequaltities for any positive real numbers \(x, y\) : (i) \(x y^{3} \leq \frac{1}{4} x^{4}+\frac{3}{4} y^{4}\) (ii) \(x y^{3}+x^{3} y \leq x^{4}+y^{4}\).
-
Prove that \(|x y|=|x||y|\) for all real numbers \(x, y\).
-
(a) Find the set of real numbers \(x eq 0\) such that \(2 x+\frac{1}{x} <3\). (b) Find the set of real numbers \(t\) such that the equation \(x^{2}+t x+3=0\) has two distinct real solutions.
Study smarter with the SolutionInn App