Consider the following schema for a movie database: Player (pID, pName, nationality) Game (gID, gName, price,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the following schema for a movie database: Player (pID, pName, nationality) Game (gID, gName, price, platform) Genre (gID, genre) Play (pID, gID, duration) Your task: write the relational algebra expressions for the following queries: 1) Find the names of the games that are in the role-playing genre and have prices lower than $200. (2 marks) 2) Find the names of the players who have played more than 5 games where duration of each is more than 3 hours. Only consider the games that are on the Windows Platform. (2 marks) 3) Find the names of the games that are in both Adventure and Action genres at the same time and have been played by German players. (3 marks) 4) Find the names of the Italian players who have only played games that are on the PSP platform and have never played any game that are in the Fighting genre. (3 marks) Note: Attributes that are not part of the primary key are not unique. Please keep to the operators/notations taught in the lecture. Consider the following schema for a movie database: Player (pID, pName, nationality) Game (gID, gName, price, platform) Genre (gID, genre) Play (pID, gID, duration) Your task: write the relational algebra expressions for the following queries: 1) Find the names of the games that are in the role-playing genre and have prices lower than $200. (2 marks) 2) Find the names of the players who have played more than 5 games where duration of each is more than 3 hours. Only consider the games that are on the Windows Platform. (2 marks) 3) Find the names of the games that are in both Adventure and Action genres at the same time and have been played by German players. (3 marks) 4) Find the names of the Italian players who have only played games that are on the PSP platform and have never played any game that are in the Fighting genre. (3 marks) Note: Attributes that are not part of the primary key are not unique. Please keep to the operators/notations taught in the lecture.
Expert Answer:
Related Book For
Microeconomics An Intuitive Approach with Calculus
ISBN: 978-0538453257
1st edition
Authors: Thomas Nechyba
Posted Date:
Students also viewed these databases questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
You decided to buy a TV set on an installment basis and agree to pay 2, 999 every end of the month, with 18 equal monthly payments at a 2% interest rate. How much are your payments after 18 months?...
-
Why is the demand for San Francisco cigarettes so much more price elastic than the overall market demand for cigarettes?
-
Pete?s Propellers Company showed the following information in its Property, Plant, and Equipment subledger regarding Machine #5027. On January 7, 2020, the machine blade cracked and it was replaced...
-
The numbers of regular season wins for each Major League Baseball team in 2016 are listed. Display the data using a box-and-whisker plot. 93 89 89 84 68 94 86 81 78 59 95 86 84 74 69 95 87 79 71 68...
-
While Clara Novak was sick, her daughter Janie helped her in many ways. Clara died, and Janie then claimed that she was entitled to be paid for the services she had rendered her mother. This claim...
-
1. What is the output of the following C++ code snippet assuming x=y=0. if ((x-1) || (y+-2)) cout < < "True" < < endl; } else cout < < "False" < < endl; } cout < < "x:" < < x < < "y:" < < y < < endl;...
-
Western Digital, a developer of storage devices and solutions, has grown dramatically since it was established in 1970. Based in San Jose, California, they employ more than 61,000 with locations...
-
d. factory overhead cost controllable variance 33. At the end of the fiscal year, variances from standard costs are usually transferred to the: a. direct labor account b. factory overhead account C....
-
Tina is trying to estimate the effect of the assets of a company on its profit, based on 1000 public companies in the UK. She constructed an econometric model in a log-log form and obtained the OLS...
-
Venus Inc. ("VI") operates a passenger train service in the country of Galaxy. VI is the sole operator of the train service in Galaxy. However, there is a host of other modes of transportation...
-
Below are departmental income statements for a guitar manufacturer. The company classifies advertising, rent, and utilities as indirect expenses. The manufacturer is considering eliminating its...
-
(a) The spliced connection shown in the figure below, is under the effect of an axial tension load (N* = 20 kN) originating from transient wind load actions only and acting along the grains of the...
-
Dennis buys a house in 1973 and finances it with a mortgage that carries an annual interest rate of 7 per cent. Inflation in 1973 is 3 per cent, inflation in 1974 is 4 per cent, and inflation in 1975...
-
1. Many people feel the Fed, which is largely independent of Congress and the President, is too powerful. In fact, the Chairman of the Fed Board of Governors has been called the second most powerful...
-
5. How much would you need to deposit in an account now in order to have $5,000 in the account in 5 years? Assume the account earns 2% interest compounded monthly. 10. You deposit $300 each month...
-
Taxing Goods versus Lump Sum Taxes: I have finally convinced my local congressman that my wifes taste for grits are nuts and that the world should be protected from too much grits consumption. As a...
-
Suppose two people want to see if they could benefit from trading with one another in a 2-good world. A: In each of the following cases, determine whether trade might benefit the two individuals: (a)...
-
Trade Barriers against Unfair Competition: Some countries subsidize some of their industries heavily which leads U.S. producers to lobby for tariffs against products from such industries. It is...
-
Find the most economical diameter of Sch. 40 commercial steel pipe that would be needed to transport a petroleum fraction with a viscosity of $60 \mathrm{cP}$ and $\mathrm{SG}$ of 1.3 at a rate of...
-
A roof drains into a gutter, which feeds into a downspout with a square cross section (4 in. $x$ 4 in.). The discharge end of the downspout is $12 \mathrm{ft}$ below the entrance and terminates in a...
-
A concrete-lined drainage ditch has a triangular cross section that is an equilateral triangle, $8 \mathrm{ft}$ on each side. The ditch has a slope of $3 \mathrm{ft} / \mathrm{mile}$. What is the...
Study smarter with the SolutionInn App