GATE | GATE CS Mock 2018 | Question 59

Consider a database with the following schema:

Person ( name, age, gender )
name is a key
Frequents ( name, pizzeria )
(name, pizzeria) is a key
Eats ( name, pizza )
(name, pizza) is a key
Serves ( pizzeria, pizza, price )
(pizzeria, pizza) is a key

Relational algebra expression for query “Names of all people who frequent only pizzeria’s serving at least one pizza they eat” is

(A) 1

(B) Capture2
(C) Capture3
(D) None of the above


Answer: (B)

Explanation: Find names of all people who frequent only pizzerias serving at least one pizza they eat :

Capture3

Option (B) is correct.

Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.