The Databases Course
Exercise No. 4
Relational Algebra, Calculus and QBE
Due on January19th by midnight
- What are the names of sites in Ukraine which hosted a Flamingo in a research project?
- List the id's of whales that weigh more than 500 kilograms.
- Find the drinkers that frequent only bars that serve some beer that they like.
- Find the drinkers that frequent no bar that serves a beer that they like.
- Express their semi-join using tuple relational calculus.
- Express their division using tuple relational calculus.
- Assume that C is a numeric field. Write a tuple relational calculus query that takes Q as input, and returns the list of B's that are attached to the smallest C in the table.
- Explain why every relational algebra query is safe.
- Are unsafe queries expressible in relational algebra?