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). (c) R1: ACTORS WHERE YearOfBirth < 1940 OR Gender = 'female' R2(SSNo, FName, LName): R1 [ SSNo, FName, LName ] R3: R2 NATURAL-JOIN ACTEDIN OVER SSNo C: R3 [ LName, Character ] (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
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).
(c) R1: ACTORS WHERE YearOfBirth < 1940 OR Gender = 'female'
R2(SSNo, FName, LName): R1 [ SSNo, FName, LName ]
R3: R2 NATURAL-JOIN ACTEDIN OVER SSNo
C: R3 [ LName, Character ]
(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
WHERE A.SSNo = AI.SSNo
GROUP BY A.SSNo, A.FName, A.LName
HAVING count(*) > 2 OR count(*) = 0
![Consider the following ACTORS, FILMS and ACTEDIN relations for this problem.
АСTORS
FILMS
SSNO FName
LName
YearOfBirth
Gender
Film FilmTitle
Number Lengthin
Production OfPrices Mins
Yearof
No
1
Bruce
Willis
1955
male
1
The Sixth Sense
1999
32
107
Milla
Jονοvich
1975
female
2
Sin City
2005
31
124
3
Clint
Eastwood 1930
male
3
The Fifth Element
1997
126
4
Turkan
Sray
1945
female
4
Unforgiven
1992
40
131
Kevin
Costner
1955
male
5
A Perfect World
1993
22
138
Robert
De Niro
1943
male
6.
A Bronx Tale
1993
1
177
7
Yilmaz
Guney
1937
male
The Godfather I|
7
1974
16
202
8.
Al
Pacino
1940
male
8
Once Upon a Time in America
1984
13
229
9
Danny
Devito
1944
male
9
One Flew Over the Cuckoo's Nest 1975
35
131
10
Jack
Nicholson 1937
male
10
The Departed
2006
94
151
11
Tarik
Akan
1949
male
11
The Shining
1980
3
146
12
Kadir
Inanir
1949
male
12
Titanic
1997
121
194
13
Selvi Boylum Al Yazmalim
1977
90
АСТEDIN
14
Yol
1982
6
114
SSNO
FilmNo
Character
15
Inception
2010
148
148
1
1
Dr. Malcolm Crowe
1
2
Hartigan
1
3
Korben Dallas
2
3
Leeloo
3
4
Bill Munny
3
Chief Red Garnett
4
13
Asya
Robert 'Butch' Haynes
6.
Lorenzo
7
Vito Corleone
8
David 'Noodles' Aaronson
7
Michael Corleone
9
Martini
10
R.P. McMuphy
10
10
Frank Costello
10
11
Jack Torrance
Seyit Ali
11
14
12
13
Ilyas
2.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fc6e794dc-d7a8-4085-81d7-e6eb3306a3e8%2Fe6244193-b425-4c0b-8945-64082cd1cccf%2Fqb39udv_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)