Question: Consider a database with the following schema. LIKES(drinker,beer); /* key: all columns */ FREQUENTS(drinker,pub); /* key: all columns */ SERVES(pub,beer,cost); /* key: (pub,beer) */ Translate

Consider a database with the following schema. LIKES(drinker,beer); /* key: all columns */ FREQUENTS(drinker,pub); /* key: all columns */ SERVES(pub,beer,cost); /* key: (pub,beer) */ 

Translate the following Relational Algebra statements into Datalog Queries

1.) select pubs from likes,frequents where likes.drinker=frequents.drinker and frequents.drinker=joe 2.) select drinker from likes,frequents,serves where likes.drinker=frequents.drinker and serves.cost<3 3.) select drinker from likes,frequents where likes.drinker!=frequents.drinker 4.) pub likes,frequents,serves like.drinker =frequents.drinker and>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!