Question: For the following Relational Algebra / SQL statements, specify the output of each query. (do not explain how each query will be executed, but specify

For the following Relational Algebra / SQL statements, specify the output of each query. (do not explain how each query will be executed, but specify the output to be obtained when the query is executed).
(d) SELECT A1.FName, A1.LName, A1.YearOfBirth
FROM ACTORS A1, ACTORS A2
WHERE A1.YearOfBirth = A2.YearOfBirth AND
A1.SSNo != A2.SSNo
(e) R1: ACTEDIN [ FilmNo, SSNo ]
R2: FILMS WHERE FilmTitle = 'Unforgiven' [ FilmNo ]
R3: ACTEDIN NATURAL-JOIN R2 OVER FilmNo [ SSNo ]
R4: ACTORS NATURAL-JOIN R3 OVER SSNo [ SSNo, FName, LName ]
R5: ( R1.SSNo R4.SSNo ) [ FilmNo ]
C: ACTEDIN NATURAL-JOIN R5 OVER FilmNo [ FilmTitle ]
(f) SELECT A.FName, A.LName, COUNT(*)
FROM ACTORS A, ACTEDIN AI
WHERE A.SSNo = AI.SSNo
GROUP BY A.SSNo, A.FName, A.LName
HAVING count(*) > 2 OR count(*) = 0
Number OfPrices Lengthin Mins 32 107 2005 31 124 Clint 9 126 40 131 22 138 Consider the following ACTORS, FILMS and ACTEDIN relations for this problem. ACTORS FILMS SSNO FName LName YearOfBirth Gender Film FilmTitle Year of No Production 1 Bruce Willis 1955 male The Sixth Sense 1999 2 Milla Jovovich 1975 female 2 Sin City 3 Eastwood 1930 male 3 The Fifth Element 1997 4 Turkan Soray 1945 female 4 Unforgiven 1992 5 Kevin Costner 1955 male 5 A Perfect World 1993 6 Robert De Niro 1943 male 6 A Bronx Tale 1993 7 Yilmaz Guney 1937 male 7 The Godfather 11 1974 AI Pacino 1940 male 8 Once Upon a Time in America 1984 9 Danny Devito 1944 male 9 One Flew Over the Cuckoo's Nest 1975 10 Jack Nicholson 1937 male 10 The Departed 2006 11 Tarik Akan 1949 male 11 The Shining 1980 12 Kadir Inanir 1949 male 12 Titanic 1997 13 Selvi Boylum Al Yazmalim 1977 ACTEDIN 14 Yol 1982 SSNO FilmNo Character 15 Inception 2010 1 177 16 202 8 13 229 35 131 94 151 3 146 121 194 2 90 6 114 148 148 1 1 1 2 3 1 2 3 4 3 3 5 4 13 5 5 6 6 Dr. Malcolm Crowe Hartigan Korben Dallas Leeloo Bill Munny Chief Red Garnett Asya Robert 'Butch' Haynes Lorenzo Vito Corleone David 'Noodles' Aaronson Michael Corleone Martini R.P. McMuphy Frank Costello Jack Torrance Seyit Ali Ilyas 6 7 6 8 8 7 9 9 10 9 10 10 10 11 11 14 12 13
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
