Dee 4 22 4.0 2 3 C
3 1 A
3 2 C
3 3 F
4 2 A
How would you design the following queries in Relational Algebra:
- The id#s of students who are 19 or 20.
- The student names (sname) of those students who have taken CS 1621.
- Students (names) who have taken a biology course or ECE course.
- Students (names) who have taken every course in Class.
- Students (names) who have received an A.
4. Answer question 3 using Domain Relational Calculus.
5. Answer question 3 using SQL.
For added practice, produce queries for exercises 5.1, 5.3 (answers can
be found on textbook web page).
6. Answer question 9 using QBE and skeletons as shown in class.
For added practice, produce queries for exercises 6.1.
7. Define the following operations in relational algebra:
Selection, Projection, Cross Product, Intersection, Union, Natural Join,
How would you perform operations similar to these in Domain Relational
8. A SQL query may have five different clauses, a SELECT, FROM, WHERE,
GROUP BY and HAVING clause. Explain how each of these clauses works
and how they are evaluated in an SQL query. Give an example using
all five clauses.
9. How is a view defined in SQL? How are queries on views resolved? What
are some of the difficulties introduced with views?
10. What is meant by the term Buffer Replacement Policy? Give an example of
a buffer replacement policy and explain how this policy affects a DB.
Make sure to give advantages and disadvantages of your sample policy.
11. What are the advantages of using a variable length format for records in
a file. Give an example of how you might represent a record with four
fields, each of varying lengths.
12. Describe how each of the following page formats represents records:
* Variable length records with a slot directory
* Packed fixed length records
* Unpacked fixed length records with a bitmap