Relations Person ( ssn, fname ) //person's information Restaurant ( restID, restName )
Posted: Fri May 20, 2022 2:46 pm
Relations
Person ( ssn, fname )
//person's
information
Restaurant ( restID, restName )
//name of restaurant
Likes ( ssn, foodType )
//name of person
and food they like
Serves ( restID, foodType )
//type of food restaurant
serves
Sample data
Person
Restaurant
Likes
Serves
111, john 1, cheese cake factory
111, pizza 1,
pizza
112, jack 2, burger king
111, burgers 1, burgers
113, jill 3, Kabobs
112, pizza
2, burgers
113,
kabob 3, Kabob
Use Relational algebra to answer the
following. Be sure to identify the question number for
each of your responses
1) Display name of all restaurants that don't serve
burgers
2) Display name of all people who only eat pizza
3) Display name of all restaurants that Jack can eat at
Person ( ssn, fname )
//person's
information
Restaurant ( restID, restName )
//name of restaurant
Likes ( ssn, foodType )
//name of person
and food they like
Serves ( restID, foodType )
//type of food restaurant
serves
Sample data
Person
Restaurant
Likes
Serves
111, john 1, cheese cake factory
111, pizza 1,
pizza
112, jack 2, burger king
111, burgers 1, burgers
113, jill 3, Kabobs
112, pizza
2, burgers
113,
kabob 3, Kabob
Use Relational algebra to answer the
following. Be sure to identify the question number for
each of your responses
1) Display name of all restaurants that don't serve
burgers
2) Display name of all people who only eat pizza
3) Display name of all restaurants that Jack can eat at