DATABASE MANAGEMENT
SYSTEMS
SOLUTIONS MANUAL
THIRD EDITION
Raghu Ramakrishnan
University of Wisconsin
Madison, WI, USA
Johannes Gehrke
Cornell University
Ithaca, NY, USA
Jeff Derstadt, Scott Selikoff, and Lin Zhu
Cornell University
Ithaca, NY, USA
CONTENTS
PREFACE iii
1 INTRODUCTION TO DATABASE SYSTEMS 1
2 INTRODUCTION TO DATABASE DESIGN 7
3THERELATIONALMODEL 22
4 RELATIONAL ALGEBRA AND CALCULUS 42
5 SQL: QUERIES, CONSTRAINTS, TRIGGERS 59
6 DATABASE APPLICATION DEVELOPMENT 90
7 INTERNET APPLICATIONS 94
8 OVERVIEW OF STORAGE AND INDEXING 102
9 STORING DATA: DISKS AND FILES 113
10 TREE-STRUCTURED INDEXING 122
11 HASH-BASED INDEXING 141
12 OVERVIEW OF QUERY EVALUATION 166
13 EXTERNAL SORTING 175
14 EVALUATION OF RELATIONAL OPERATORS 181
i
iiDatabase Management Systems Solutions Manual Third Edition
15 A TYPICAL QUERY OPTIMIZER
197
16 OVERVIEW OF TRANSACTION MANAGEMENT 218
17 CONCURRENCY CONTROL 228
18 CRASH RECOVERY 245
19 SCHEMA REFINEMENT AND NORMAL FORMS 258
20 PHYSICAL DATABASE DESIGN AND TUNING 278
21 SECURITY 292
PREFACE
It is not every question that deserves an answer.
Publius Syrus, 42 B.C.
I hope that most of the questions in this book deserve an answer. The set of questions
is unusually extensive, and is designed to reinforce and deepen students’ understanding
of the concepts covered in each chapter. There is a strong emphasis on quantitative
and problem-solving type exercises.
While I wrote some of the solutions myself, most were written originally by students
in the database classes at Wisconsin. I’d like to thank the many students who helped
in developing and checking the solutions to the exercises; this manual would not be
available without their contributions. In alphabetical order: X. Bao, S. Biao, M.
Chakrabarti, C. Chan, W. Chen, N. Cheung, D. Colwell, J. Derstadt, C. Fritz, V.
Ganti, J. Gehrke, G. Glass, V. Gopalakrishnan, M. Higgins, T. Jasmin, M. Krish-
naprasad, Y. Lin, C. Liu, M. Lusignan, H. Modi, S. Narayanan, D. Randolph, A.
Ranganathan, J. Reminga, A. Therber, M. Thomas, Q. Wang, R. Wang, Z. Wang and
J. Yuan. In addition, James Harrington and Martin Reames at Wisconsin and Nina
Tang at Berkeley provided especially detailed feedback.
Several students contributed to each chapter’s solutions, and answers were subse-
quently checked by me and by other students. This manual has been in use for several
semesters. I hope that it is now mostly accurate, but I’m sure it still contains er-
rors and omissions. If you are a student and you do not understand a particular
solution, contact your instructor; it may be that you are missing something, but it
may also be that the solution is incorrect! If you discover a bug, please send me mail
(raghu@cs.wisc.edu) and I will update the manual promptly.
The latest version of this solutions manual is distributed freely through the Web; go
to the home page mentioned below to obtain a copy.
For More Information
The home page for this book is at URL:
iii
Database Management Systems Solutions Manual Third Edition
http://www.cs.wisc.edu/~ dbbook
This page is frequently updated and contains information about the book, past and
current users, and the software. This page also contains a link to all known errors in
the book, the accompanying slides, and the software. Since the solutions manual is
distributed electronically, all known errors are immediately fixed and no list of errors is
maintained. Instructors are advised to visit this site periodically; they can also register
at this site to be notified of important changes by email.
评论5
最新资源