Search Header Logo
Relational algebra in DBMS

Relational algebra in DBMS

Assessment

Presentation

•

Architecture, Education

•

University

•

Hard

Created by

Kavi Moki

Used 6+ times

FREE Resource

3 Slides • 0 Questions

1

Relational algebra

Q1.Find the names of sailors who have reserved boat 103
πsname((σbid=103Reserves) |X|Sailors)

Q2. Find the names of sailors who have reserved a red boat?
πsname((σcolor='red'Boats) |X|Reserves |X|Sailors)

Q3. Find the colors of boats reserved by Lubber?

πcolor((σsname='Lubber'Sailors) |X| Reserves |X| Boats)

Slide image

2

Relational Algebra

Q4. Find the names of sailors who have reserved at least one boat?
πsname(Sailors |X| Reserves)

Q5. Find the names of sailors who have reserved a Red boat or a Green boat?
ρ(T empboats,(σcolor='red'Boats) ∪ (σcolor='green'Boats))

πsname(T empboats |X|Reserves |X|Sailors)

Q6. Find the names of sailors who have reserved a Red boat and a Green boat?

ρ(T empred, πsid((σcolor='red'Boats) |X|Reserves))
ρ(T empgreen, πsid((σcolor='green'Boats) |X| Reserves))
πsname((T empred ∩ T empgreen) |X| Sailors)


3

Relational Algebra

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 the boats?



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

pattern-tertiary

Relational algebra

Q1.Find the names of sailors who have reserved boat 103
πsname((σbid=103Reserves) |X|Sailors)

Q2. Find the names of sailors who have reserved a red boat?
πsname((σcolor='red'Boats) |X|Reserves |X|Sailors)

Q3. Find the colors of boats reserved by Lubber?

πcolor((σsname='Lubber'Sailors) |X| Reserves |X| Boats)

Slide image

Show answer

Auto Play

Slide 1 / 3

SLIDE