0% found this document useful (1 vote)
718 views2 pages

Relational Algebra, TRC, DRC Questions

The document provides examples of queries to run against relational data about sailors, boat reservations, and boats. It asks for 10 queries to be expressed in relational algebra, 5 queries in tuple relational calculus, and 5 queries in domain relational calculus. The queries find information like the names of sailors who reserved a specific boat or color of boat, the colors of boats reserved by a sailor, and the names of sailors who reserved multiple or all boats. It suggests comparing the results of queries 1, 2, 7, 9, and 14 across the different relational query methods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
718 views2 pages

Relational Algebra, TRC, DRC Questions

The document provides examples of queries to run against relational data about sailors, boat reservations, and boats. It asks for 10 queries to be expressed in relational algebra, 5 queries in tuple relational calculus, and 5 queries in domain relational calculus. The queries find information like the names of sailors who reserved a specific boat or color of boat, the colors of boats reserved by a sailor, and the names of sailors who reserved multiple or all boats. It suggests comparing the results of queries 1, 2, 7, 9, and 14 across the different relational query methods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Consider the following instances of relations Sailors, Reserves, Boats and answer the following

queries in Relational algebra, Tuple relational calculus and Domain relational calculus.

Sailors S3

Reserves R2

Boats B1

Give the answers for the following queries in Relational Algebra:


Q1. Find the names of sailors who have reserved boat 103.
Q2. Find the names of sailors who have reserved a red boat.
Q3. Find the colors of boats reserved by Lubber.
Q4. Find the names of sailors who have reserved at least one boat.
Q5. Find the names of sailors who have reserved a red or a green boat.
Q6. Find the names of sailors who reserved a red and a green boat.
Q7. Find the names of sailors who have reserved at least two boats.
Q8. Find the sids of sailors with age over 20 who have not reserved a red boat.

Q9. Find the names of sailors who have reserved all boats.
Q10. Find the names of sailors who have reserved all boats called Interlake.

Give the answers for the following queries in Tuple relational calculus:
Q11. Find all the sailors with a rating above 7.
Q12. Find the names and ages of sailors with a rating above 7.
Q13. Find the sailor name, boat id, and reservation date for each reservation.
Q1. Find the names of sailors who have reserved boat 103.
Q2. Find the names of sailors who have reserved a red boat.
Q7. Find the names of sailors who have reserved at least two boats.
Q9. Find the names of sailors who have reserved all boats.
Q14. Find sailors who have reserved all red boats.

Give the answers for the following queries in Domain relational calculus:
Q11. Find all the sailors with a rating above 7.
Q1. Find the names of sailors who have reserved boat 103.
Q2. Find the names of sailors who have reserved a red boat.
Q7. Find the names of sailors who have reserved at least two boats.
Q9. Find the names of sailors who have reserved all boats.
Q14. Find sailors who have reserved all red boats.

You can compare the results of Queries 1, 2, 7, 9, 14 in each of the methods.

You might also like