Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 7 (24 points) Consider the following ACTORS, FILMS and ACTEDIN relations for this problem. The Primary Keys of the relations are underlined. Foreign Key
Problem 7 (24 points) Consider the following ACTORS, FILMS and ACTEDIN relations for this problem. The Primary Keys of the relations are underlined. Foreign Key Constraints are represented by arrows. ACTORS (SSNo, FName, LName, YearOfBirth, Gender) FILMS ( FilmNo, Film Title, YearOfProduction, NumberOfPrices, Lengthin Mins) ACTEDIN ( SSNo, FilmNo Character) 1. Implement the following queries using the Relational Algebra. (a) retrieve First and Last Names of all the Actors who are 70 years or older as of today. Answer: (b) find all the Actors who played the role(character) of 'Frank Costello'. For each such actor retrieve his/her First Name, his/her Last Name, and the Film Title in which (s)he acted as the role(character) of 'Frank Costello'. Answer: (c) find all the Actors who acted in at least one film in which 'Clint Eastwood' has also acted. Retrieve First and last names of these actors. (Note: the result list should not include 'Clint Eastwood'). Answer: II. Implement the following queries using SQL. (a) retrieve all the character names being acted in the film 'The Godfather II'. Answer: (b) find all the actors who had acted in more than two(2) films. For each such actor, retrieve his/her First Name, Last Name, and the number of films (she had acted in. Answer: (c) retrieve the total number of prices the films had received in which the actor 'Robert De Niro' acted. Answer: ACTORS FILMS SSNO Fame LName YearOfBirth Gender 1 male 2 3 Bruce Milla Clint Turkan Kevin Robert Yilmaz female male female male Number Length OfPrices Mins 32 107 31 124 9 126 40 131 22 138 1 177 5 1993 6 male Film No 1 2 3 4 5 6 7 8 9 10 11 12 13 Willis 1955 Jovovich 1975 Eastwood 1930 Soray 1945 Costner 1955 De Niro 1943 Guney 1937 Pacino 1940 Devito 1944 Nicholson 1937 Akan 1949 Inanir 7 male FilmTitle Yeart Production The Sixth Sense 1999 Sin City 2005 The Fifth Element 1997 Unforgiven 1992 A Perfect World A Bronx Tale 1993 The Godfather 1974 Once Upon a Time in America 1984 One Flew Over the Cuckoo's Nest 1975 The Departed 2006 The Shining 1980 Titanic 1997 Selvi Boylum Al Yazmalim 1977 Yol 1982 Inception 2010 202 8 male 9 male Danny Jack 229 131 151 10 male 11 Tank male 16 13 35 94 3 121 2 6 148 146 12 Kadir 1949 male 194 90 ACTEDIN Filimo SSN Character 15 148 1 2 1 1 3 2 3 4 3 5 13 4 5 5 De Malcolm Crowe Hartigan Korben Dallas Leeloo Bill Munny Chief Red Garnett Asya Robert Butch' Haynes Lorenzo Vito Corleone David "Noodles' Aaronson Michael Corleone Martini RP. McMuphy Frank Costello Jack Torrance Seyit AS Ilyas 8 7 8 7 9 9 10 11 14 10 10 10 12 13
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started