Example: biology

DATABASE MANAGEMENT SYSTEMS SOLUTIONS MANUAL

DATABASE MANAGEMENTSYSTEMSSOLUTIONS MANUALR aghu Ramakrishnan et of WisconsinMadison, WI, USACONTENTSPREFACEiii1 INTRODUCTION TO DATABASE SYSTEMS12 THE ENTITY-RELATIONSHIP MODEL53 THE RELATIONAL MODEL144 RELATIONAL ALGEBRA AND CALCULUS235 SQL: QUERIES, PROGRAMMING, TRIGGERS406 QUERY-BY-EXAMPLE (QBE)567 STORING DATA: DISKS AND FILES658 FILE ORGANIZATIONS AND INDEXES729 TREE-STRUCTURED INDEXING7510 HASH-BASED INDEXING8711 EXTERNAL SORTING10512 EVALUATION OF RELATIONAL OPERATORS10913 INTRODUCTION TO QUERY OPTIMIZATION11814 A TYPICAL QUERY OPTIMIZER119iiiDatabase MANAGEMENT SYSTEMS SOLUTIONS Manual15 SCHEMA REFINEMENT AND NORMAL FORMS13416 PHYSICAL DATABASE DESIGN AND TUNING14517 SECURITY15818 TRANSACTION MANAGEMENT OVERVIEW16319 CONCURRENCY CONTROL16820 CRASH RECOVERY18021 PARALLEL AND DISTRIBUTED DATABASES190 PREFACEIt is not every question that deserves an Syrus, 42 hope that most of the questions in this book deserve an answer.

advantage of these new functions? Answer 1.8 Answer omitted. Exercise 1.9 Answer the following questions: 1. What is a transaction? 2. Why does a DBMS interleave the actions of di erent transactions, instead of executing transactions one after the other? 3. What must a user guarantee with respect to a transaction and database consis-tency?

Tags:

  Management, Advantage

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of DATABASE MANAGEMENT SYSTEMS SOLUTIONS MANUAL

1 DATABASE MANAGEMENTSYSTEMSSOLUTIONS MANUALR aghu Ramakrishnan et of WisconsinMadison, WI, USACONTENTSPREFACEiii1 INTRODUCTION TO DATABASE SYSTEMS12 THE ENTITY-RELATIONSHIP MODEL53 THE RELATIONAL MODEL144 RELATIONAL ALGEBRA AND CALCULUS235 SQL: QUERIES, PROGRAMMING, TRIGGERS406 QUERY-BY-EXAMPLE (QBE)567 STORING DATA: DISKS AND FILES658 FILE ORGANIZATIONS AND INDEXES729 TREE-STRUCTURED INDEXING7510 HASH-BASED INDEXING8711 EXTERNAL SORTING10512 EVALUATION OF RELATIONAL OPERATORS10913 INTRODUCTION TO QUERY OPTIMIZATION11814 A TYPICAL QUERY OPTIMIZER119iiiDatabase MANAGEMENT SYSTEMS SOLUTIONS Manual15 SCHEMA REFINEMENT AND NORMAL FORMS13416 PHYSICAL DATABASE DESIGN AND TUNING14517 SECURITY15818 TRANSACTION MANAGEMENT OVERVIEW16319 CONCURRENCY CONTROL16820 CRASH RECOVERY18021 PARALLEL AND DISTRIBUTED DATABASES190 PREFACEIt is not every question that deserves an Syrus, 42 hope that most of the questions in this book deserve an answer.

2 The set of questionsis unusually extensive, and is designed to reinforce and deepen students' understandingof the concepts covered in each chapter. There is a strong emphasis on quantitative andproblem-solving type exercises. Answers to almost all chapter exercises are includedin this SOLUTIONS MANUAL for Chapters 1 through 19. SOLUTIONS for Chapters 20 through22 are currently I wrote some of the SOLUTIONS myself, most were written originally by studentsin the DATABASE classes at Wisconsin. I'd like to thank the many students who helpedin developing and checking the SOLUTIONS to the exercises; this MANUAL would not beavailable without their contributions. In alphabetical order: X. Bao, S. Biao, , C. Chan, W. Chen, N. Cheung, D. Colwell, C. Fritz, V.

3 Ganti, J. Gehrke,G. Glass, V. Gopalakrishnan, M. Higgins, T. Jasmin, M. Krishnaprasad, Y. Lin, C. Liu,M. Lusignan, H. Modi, S. Narayanan, D. Randolph, A. Ranganathan, J. Reminga, , M. Thomas, Q. Wang, R. Wang, Z. Wang and J. Yuan. In addition, JamesHarrington and Martin Reames at Wisconsin and Nina Tang at Berkeley providedespecially detailed 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 severalsemesters. I hope that it is now mostly accurate, but I'm sureit still contains er-rors and omissions. If you are a student and you do not understand a particularsolution, contact your instructor; it may be that you are missing something, but itmay also be that the solution is incorrect!

4 If you discover a bug, please send me and I will update the MANUAL latest version of this SOLUTIONS MANUAL is distributed freely through the Web; goto the home page mentioned below to obtain a MANAGEMENT SYSTEMS SOLUTIONS ManualFor More InformationThe home page for this book is at URL: page is frequently updated and contains information about the book, past andcurrent users, and the software. This page also contains a link to all known errors inthe book, the accompanying slides, and the the SOLUTIONS MANUAL isdistributed electronically, all known errors are immediately xed and no list of errors are advised to visit this site periodically; they can also registerat this site to be noti ed of important changes by TODATABASE SYSTEMSE xercise would you choose a DATABASE system instead of simply storing datain operating system les?

5 When would it make sensenotto use a DATABASE system?Answer an integrated collection of data, usually so large that ithas to be stored on secondary storage devices such as disks or tapes. This data canbe maintained as a collection of operating system les, or stored in aDBMS(databasemanagement system). The advantages of using a DBMS are:Data independence and e cient application programs are in-dependent of the details of data representation and storage. The conceptual andexternal schemas provide independence from physical storage decisions and logicaldesign decisions respectively. In addition, a DBMS provides e cient storage andretrieval mechanisms, including support for very large les, index structures andquery application development the DBMS provides several impor-tant functions required by applications, such as concurrency control and crashrecovery, high level query facilities, etc.

6 , only application-speci c code needs tobe written. Even this is facilitated by suites of application development toolsavailable from vendors for many DATABASE MANAGEMENT integrity and view mechanism and the authorization facilitiesof a DBMS provide a powerful access control mechanism. Further, updates to thedata that violate the semantics of the data can be detected and rejected by theDBMS if users specify the appropriateintegrity providing a common umbrella for a large collection ofdata that is shared by several users, a DBMS facilitates maintenance and dataadministration tasks. A good DBA can e ectively shield end-users from the choresof ne-tuning the data representation, periodic back-ups 1 Concurrent access and crash DBMS supports the notion of atrans-action, which is conceptually a single user's sequential program.

7 Users can writetransactions as if their programs were running in isolation against the DBMS executes the actions of transactions in an interleaved fashion to obtaingood performance, but schedules them in such a way as to ensure that conflictingoperations are not permitted to proceed concurrently. Further, the DBMS main-tains a continuous log of the changes to the data, and if there is a system crash,it can restore the DATABASE to atransaction-consistentstate. That is, the actionsof incomplete transactions are undone, so that the DATABASE state reflects only theactions of completed transactions. Thus, if each complete transaction, executingalone, maintains the consistency criteria, then the DATABASE state after recoveryfrom a crash is these advantages are not important for the application at hand, using a collection of les may be a better solution because of the increased cost and overhead of purchasingand maintaining a is logical data independence and why is it important?

8 Answer the di erence between logical and physical data data independence means that users are shielded from changesin the logical structure of the data, while physical data independence insulates usersfrom changes in the physical storage of the data. We saw an example of logical dataindependence in the answer to Exercise Consider the Students relation from thatexample (and now assume that it is not replaced by the two smaller relations). Wecould choose to store Students tuples in a heap le, with a clustered index on thesname eld. Alternatively, we could choose to store it with an index on the gpa eld,or to create indexes on both elds, or to store it as a le sorted by gpa. These storagealternatives are not visible to users, except in terms of improved performance, sincethey simply see a relation as a set of tuples.

9 This is what is meant by physical the di erence between external, internal, and conceptual sche-mas. How are these di erent schema layers related to the concepts of logical andphysical data independence?Answer are the responsibilities of a DBA? If we assume that the DBAis never interested in running his or her own queries, does the DBA still need tounderstand query optimization? Why?Introduction to DATABASE Systems3 Answer DBA is responsible for:Designing the logical and physical schemas, as well as widely-used portions of theexternal and availability and recovery from tuning:The DBA is responsible for evolving the DATABASE , in particularthe conceptual and physical schemas, to ensure adequate performance as userrequirements DBA needs to understand query optimization even if s/he is not interested in run-ning his or her own queries because some of these responsibilities ( DATABASE designand tuning) are related to query optimization.

10 Unless the DBA understands the per-formance needs of widely used queries, and how the DBMS will optimize and executethese queries, good design and tuning decisions cannot be McNugget wants to store information (names, addresses, de-scriptions of embarrassing moments, etc.) about the many ducks on his payroll. Notsurprisingly, the volume of data compels him to buy a DATABASE system. To savemoney, he wants to buy one with the fewest possible features, and he plans to run it asa stand-alone application on his PC clone. Of course, Scrooge does not plan to sharehis list with anyone. Indicate which of the following DBMS features Scrooge shouldpay for; in each case also indicate why Scrooge should (or should not) pay for thatfeature in the system he A security Concurrency Crash A view A query of the following plays an important role inrepresentinginforma-tion about the real world in a DATABASE ?


Related search queries