0% found this document useful (0 votes)
20 views1 page

Tute04-RA Part1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views1 page

Tute04-RA Part1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Bachelor of Science in Information Technology

Database Management Systems


Year 1 Semester 2
Tutorial 4 - Relational Algebra

1) Consider the following 3 relations on Chef, Prepare and Dish.

Chef
ChefID name rating country
1 Nihal 8 Sri Lanka
4 Sam 6 Italy Prepare
6 Dan 9 Sri Lanka
9 Jason 8 France
Dish
DishID dname price category
Write Relational Algebra D1 Garlic Roast chicken 400 Chicken
expressions to answer the D2 Chicken stir-fry 300 Chicken
following questions. D3 Fresh pear pie 350 Pie
D4 Apple slab pie 200 Pie
a) Display name, country and D5 Black magic cake 800 cake
ChefID DishID
rating of all Chefs. 4 D1
1 D2
b) Display name and rating of 6 D1
9 D5
all Sri Lankan Chefs. 4 D3
9 D4
c) Display the ChefID and

country of all Chefs with a rating above 6.

d) Display dish names with a price above 300.

e) Display Dish ID , dname and price of all dishes from ‘cake’category.

f) Display the dish name of dishes where price is above 300 and category is Chicken.

g) Display name and rating of all Chefs whose country is France or rating above 8.

You might also like