Exercises (Course: Database Management Systems)

advertisement
Review Questions and Exercises
(Course: Database Management Systems)
Chaper 1
Disk Storage, Basic File Structures and Hashing
Review Questions
Q1. Question 13.16 in the text book (“Fundamentals of Database Systems- 4th Edition”,
Elmasri et al., 2004)
Q2. Question 13.17 in the text book
Q3. Question 13.18 in the text book
Q4. Question 13.20 in the text book
Q5. Question 13.21 in the text book
Exercises
E1. Exercise 13.23 in the text book (“Fundamentals of Database Systems- 4th Edition”,
Elmasri et al., 2004)
E2. Exercise 13.24 in the text book
E3. Exercise 13.27 in the text book
E4. Exercise 13.28 in the text book
E5. Exercise 13.29 in the text book
E6. Exercise 13.34 in the text book
E7. Exercise 13.35 in the text book
E8. Exercise 13.36 in the text book
Review Questions and Exercises
Chaper 2
Indexing Structures for Files
Review Questions
Q1. Question 14.1 in the text book (“Fundamentals of Database Systems- 4th Edition”,
Elmasri et al., 2004)
Q2. Question 14.2 in the text book
Q3. Question 14.3 in the text book
Q4. Question 14.4 in the text book
Q5. Question 14.5 in the text book
Q6. Question 14.6 in the text book
Q7. Question 14.7 in the text book
Exercises
E1. Exercise 14.15 in the text book (“Fundamentals of Database Systems- 4th Edition”,
Elmasri et al., 2004)
E2. Exercise 14.16 in the text book
E3. Exercise 14.17 in the text book
E4. Exercise 14.18 in the text book
Review Questions and Exercises
Chaper 3
Algorithms for Query Processing and Optimization
Review Questions
Q1. Question 15.1 in the text book(“Fundamentals of Database Systems- 4th Edition”,
Elmasri et al., 2004)
Q2. Question 15.3 in the text book
Q3. Question 15.4 in the text book
Q4. Question 15.5 in the text book
Q5. Question 15.6 in the text book
Q6. Question 15.7 in the text book
Q7. Question 15.8 in the text book
Q8. Question 15.9 in the text book
Exercises
E1. Exercise 15.13 in the text book (“Fundamentals of Database Systems- 4th Edition”,
Elmasri et al., 2004)
E2. Exercise 15.14 in the text book
E3. Given the following relations:
EMPLOYEE(ename, ssn, bdate, address, sex, salary, dno)
PROJECT(pname, pnumber, plocation)
WORKS_ON(essn, pno, hours)
and the query:
“Find the names of the employees whose birthdates are after 1957 and currently work for
the project Aquarius”
Apply the heuristic optimization transformation rules to find an efficient query execution
plan for the above query, which is described by the following query tree.
ename
Pname = ‘Aquarius’ and Pnumber=Pno
and Essn = Ssn and Bdate > ’31-12-1957’


Employee
Project
Works_on
E4
Given the three following relations:
Supplier(Supp#, Name, City, Specialty)
Project(Proj#, Name, City, Budget)
Order(Supp#, Proj#, Part-name, Quantity, Cost)
and the SQL query:
SELECT Supplier.Name, Project.Name
FROM Supplier, Order, Project
WHERE Supplier.City = ‘New York City’ AND Project.Budget > 10000000 AND
Supplier.Supp# = Order.Supp# AND Order.Proj# = Project.Proj#
a. Write the relational algebraic expression that is equivalent to the above query and
draw a query tree for the expression.
b. Apply the heuristic optimization transformation rules to find an efficient query
execution plan for the above query. Assume that the number of the supliers in
New York is larger that the number of the projects with the budgets more than
10000000$.
Download