Consider a relational schema for storing information related to movies: Actor(name, YofB, country_of_birth, bio) Director(name, YofB,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider a relational schema for storing information related to movies: Actor(name, YofB, country_of_birth, bio) Director(name, YofB, country_of_birth, bio) Producer(name, YofB, country_of_birth) Country(code, name) Movie(title, year, genre, budget, gross_earnings) DirectorMovie(d name, d YofB, m_title, m_year) ActorMovie(a name, a YofB, m title, m year) ProducerMovie(p name, p YofB, m title, m year) Actor[country_of_birth] Country[code] Director[country_of_birth] Country[code] Producer[country_of_birth] Country[code] DirectorMovie [d_name, d_YofB] ≤ Director[name, YofB] DirectorMovie[m_title, m_year] Movie [name, year] ActorMovie [a_name, a_YofB] Actor[name, YofB] ActorMovie [m_title, m_year] Movie[name, year] ProducerMovie [p_name, p_YofB] ≤ Producer[name, YofB] ProducerMovie [m_title, m_year] Movie [name, year] Attribute genre in table Movie has as value one of {"comedy", "drama", "tragedy", "musical", "horror"}. Attributes YofB and year have integer values, e.g., 2022. Atributes budget and gross_earnings have integer values, e.g., 1 000 000. Attributes code and name in relation Country have values such as, "CAN", "GBR", and "Canada", "United Kingdom", respectively. Write the following queries in Relational Algebra. a. Find the producers who also acted in a movie they produced. Return their names and year of birth. b. Find producers who were younger than all the actors of the movies they produced. Return their name and year of birth. c. Find producers who only produced comedies and dramas. Return their name and year of birth. d. Find actors who never acted in a tragedy. Return their name and year of birth. Consider a relational schema for storing information related to movies: Actor(name, YofB, country_of_birth, bio) Director(name, YofB, country_of_birth, bio) Producer(name, YofB, country_of_birth) Country(code, name) Movie(title, year, genre, budget, gross_earnings) DirectorMovie(d name, d YofB, m_title, m_year) ActorMovie(a name, a YofB, m title, m year) ProducerMovie(p name, p YofB, m title, m year) Actor[country_of_birth] Country[code] Director[country_of_birth] Country[code] Producer[country_of_birth] Country[code] DirectorMovie [d_name, d_YofB] ≤ Director[name, YofB] DirectorMovie[m_title, m_year] Movie [name, year] ActorMovie [a_name, a_YofB] Actor[name, YofB] ActorMovie [m_title, m_year] Movie[name, year] ProducerMovie [p_name, p_YofB] ≤ Producer[name, YofB] ProducerMovie [m_title, m_year] Movie [name, year] Attribute genre in table Movie has as value one of {"comedy", "drama", "tragedy", "musical", "horror"}. Attributes YofB and year have integer values, e.g., 2022. Atributes budget and gross_earnings have integer values, e.g., 1 000 000. Attributes code and name in relation Country have values such as, "CAN", "GBR", and "Canada", "United Kingdom", respectively. Write the following queries in Relational Algebra. a. Find the producers who also acted in a movie they produced. Return their names and year of birth. b. Find producers who were younger than all the actors of the movies they produced. Return their name and year of birth. c. Find producers who only produced comedies and dramas. Return their name and year of birth. d. Find actors who never acted in a tragedy. Return their name and year of birth.
Expert Answer:
Answer rating: 100% (QA)
Here are the queries youve requested expressed in Relational Algebra a Find the producers who also a... View the full answer
Related Book For
Database management systems
ISBN: 978-0072465631
3rd edition
Authors: Raghu Ramakrishan, Johannes Gehrke, Scott Selikoff
Posted Date:
Students also viewed these databases questions
-
Two triangles are drawn in the coordinate plane. The vertices of the first triangle are (2,4), (4,6), and (-8,6). The vertices of the second triangle are (-1,2), (-2,3), (x,y). Find the value of xx...
-
Consider a relational schema with three relation schemas: DRIVER (Dr_license_no, Dr_name, Dr_city, Dr_state), TICKET_TYPE (Ttp_offense, Ttp_fine) and TICKET (Tic_ticket_no, Tic_ticket_date,...
-
Explore Recent Trends in Database Administration. (cite and reference sources)
-
Use the following data to calculate cost of merchandise sold under the FIFO method. September 1 Beginning Inventory 15 units at $20 each September 10 Purchase 20 units at $25 each September 20...
-
Find Io in the network shown using Thevenins Theorem IKL ImA 2mA IKO Io
-
Perfect Printers Inc. completed the following transactions during October 2017, its first month of operations: Oct. ...1 .....Received $25,000, and issued common shares. .........2..... Purchased...
-
The tall vertical pump example was successfully brought down to acceptable vibration levels by placing a long 2- 4-inch beam between the top of the motor and a cinder block wall. What else could...
-
Putters Choice carries an inventory of putters and other golf clubs. The sales price of each putter is $119. Company records indicate the following for a particular line of Putters Choice putters:...
-
You have just completed the appraisal of an office building and have concluded that the market value of the property is $3,500,000. You expect Potential Gross Income (PGI) in the first year of...
-
A dam is to be constructed using the cross-section shown. Assume the dam width is w = 160 ft. For water height H = 9 ft. calculate the magnitude and line of action of the vertical force of water on...
-
1. Vectors A and B are shown in the drawing below. Vector R (not shown) is the resultant vector where R = A + B. Indicate the signs (negative or positive) of the components: A A, B. B. R. R.
-
The language L(M) accepted by the NFA M below is represented by which regular expression? a a b O L(M)=L((ab)* aba*) L(M) = L(p(ba + a)* ba*) OL(M)= L(abaa*ba*) OL(M)=L(aa*ba* + (ab)* ab) b a O
-
Assume the date is 25 January 2024. You work for a firm of ICAEW Chartered Accountants. Yesterday, your manager met with the chief financial officer (CFO) of the Red Lion Sdn. Bhd. (RLSB). Extracts...
-
Company purchases Deluxe machine for $52,000. It has an estimated salvage value of $2,000 and a useful life of four years. Company calculates the annual straight-line depreciation for the machine....
-
I need help with the implementation of the method insertStudentsIntoLastChair. The method is already answered. I just need help with an explanation of to why and how to get that answer. (c) On the...
-
How did the three internal corporate governance mechanisms workor fail to workat Wells Fargo? Describe the organizational structure used by Wells Fargo. Do you think this structure could have...
-
dy Solve the differential equation: 2- 4y = sinh (2x + 1) + 4* dx
-
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.
-
Modern disks often have their own main memory caches, typically about 1 MB, and use this to prefetch pages. The rationale for this technique is the empirical observation that, if a disk page is...
-
Modern disk drives store more sectors on the outer tracks than the inner tracks. Since the rotation speed is constant, the sequential data transfer rate is also higher on the outer tracks. The seek...
-
Consider the following collection of relations and dependencies. Assume that each relation is obtained through decomposition from a relation with attributes ABCDEFGHI and that all the known...
-
Companies are facing a great amount of change in every facet of their operations today. To remain competitive, companies must keep abreast of current developments in several areas. You recently got...
-
For each of the situations listed, identify the primary standard from the IMA Statement of Ethical Professional Practice that is violated (competence, confidentiality, integrity, or credibility.)...
-
Sustainability involves more than just the impact of actions on the environment. The triple bottom line recognizes that a company has to measure its impact on its triple bottom line for its long-term...
Study smarter with the SolutionInn App