database management systems 3rd edition solution manual

database management systems 3rd edition solution manual


File Name:database management systems 3rd edition solution manual.pdf
Size: 1322 KB
Type: PDF, ePub, eBook
Uploaded: 1 May 2019, 14:20
Rating: 4.6/5 from 767 votes.
Last checked: 6 Minutes ago!
eBook includes PDF, ePub and Kindle version
In order to read or download database management systems 3rd edition solution manual ebook, you need to create a FREE account.

✔ Register a free 1 month Trial Account.
✔ Download as many books as you like (Personal use)
✔ Cancel the membership at any time if not satisfied.
✔ Join Over 80000 Happy Readers
database management systems 3rd edition solution manual

Get started with a FREE account. Every morning is a new arrival. A joy, a depression, a meanness, some momentary awareness comes as an unexpected visitor.Welcome and entertain them all. Treat each guest honorably. The dark thought, the shame, the malice, meet them at the door laughing, and invite them in. Be grateful for whoever comes, because each has been sent as a guide from beyond. ” ? Rumi Now in its third edition, Sy.University of.Computer System Architecture-Morris Mano third edition.Automatic Control Systems, 9th Edition - Solutions Manual.Get books you want. To add our e-mail address ( ), visit the Personal Document Settings under Preferences tab on Amazon. 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. Several students contributed to each chapter s solutions, and answers were subsequently 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 errors 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 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.

database management system 3rd edition solution manual, 1.0, database management system 3rd edition solution manual.

For More Information The home page for this book is at URL: iii 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. When would it make sense not to use a database system? Answer 1.1 A database is an integrated collection of data, usually so large that it has to be stored on secondary storage devices such as disks or tapes. This data can be maintained as a collection of operating system files, or stored in a DBMS (database management system). The advantages of using a DBMS are: Data independence and efficient access. Database application programs are independent of the details of data representation and storage. The conceptual and external schemas provide independence from physical storage decisions and logical design decisions respectively. In addition, a DBMS provides efficient storage and retrieval mechanisms, including support for very large files, index structures and query optimization. Reduced application development time. Since the DBMS provides several important functions required by applications, such as concurrency control and crash recovery, high level query facilities, etc., only application-specific code needs to be written. Even this is facilitated by suites of application development tools available from vendors for many database management systems. Data integrity and security. The view mechanism and the authorization facilities of a DBMS provide a powerful access control mechanism. Further, updates to the data that violate the semantics of the data can be detected and rejected by the DBMS if users specify the appropriate integrity constraints. Data administration.

By providing a common umbrella for a large collection of data that is shared by several users, a DBMS facilitates maintenance and data administration tasks. A good DBA can effectively shield end-users from the chores of fine-tuning the data representation, periodic back-ups etc. 1 A DBMS supports the notion of a transaction, which is conceptually a single user s sequential program. Users can write transactions as if their programs were running in isolation against the database. The DBMS executes the actions of transactions in an interleaved fashion to obtain good performance, but schedules them in such a way as to ensure that conflicting operations are not permitted to proceed concurrently. Further, the DBMS maintains a continuous log of the changes to the data, and if there is a system crash, it can restore the database to a transaction-consistent state. That is, the actions of incomplete transactions are undone, so that the database state reflects only the actions of completed transactions. Thus, if each complete transaction, executing alone, maintains the consistency criteria, then the database state after recovery from a crash is consistent. If these advantages are not important for the application at hand, using a collection of files may be a better solution because of the increased cost and overhead of purchasing and maintaining a DBMS. Exercise 1.2 What is logical data independence and why is it important? Answer 1.2 Logical data independence means that users are shielded from changes in the logical structure of the data, i.e., changes in the choice of relations to be stored. For example, if a relation Students(sid, sname, gpa) is replaced by Studentnames(sid, sname) and Studentgpas(sid, gpa) for some reason, application programs that operate on the Students relation can be shielded from this change by defining a view Students(sid, sname, gpa) (as the natural join of Studentnames and Studentgpas).

Thus, application programs that refer to Students need not be changed when the relation Students is replaced by the other two relations. The only change is that instead of storing Students tuples, these tuples are computed as needed by using the view definition; this is transparent to the application program. Exercise 1.3 Explain the difference between logical and physical data independence. Answer 1.3 Logical data independence means that users are shielded from changes in the logical structure of the data, while physical data independence insulates users from changes in the physical storage of the data. We saw an example of logical data independence in the answer to Exercise 1.2. Consider the Students relation from that example (and now assume that it is not replaced by the two smaller relations). We could choose to store Students tuples in a heap file, with a clustered index on the sname field. Alternatively, we could choose to store it with an index on the gpa field, or to create indexes on both fields, or to store it as a file sorted by gpa. These storage alternatives are not visible to users, except in terms of improved performance, since they simply see a relation as a set of tuples. This is what is meant by physical data independence. How are these different schema layers related to the concepts of logical and physical data independence? Answer 1.4 External schemas allows data access to be customized (and authorized) at the level of individual users or groups of users. Conceptual (logical) schemas describes all the data that is actually stored in the database. While there are several views for a given database, there is exactly one conceptual schema to all users. Internal (physical) schemas summarize how the relations described in the conceptual schema are actually stored on disk (or other physical media). External schemas provide logical data independence, while conceptual schemas offer physical data independence. Exercise 1.

5 What are the responsibilities of a DBA. If we assume that the DBA is never interested in running his or her own queries, does the DBA still need to understand query optimization. Why? Answer 1.5 The DBA is responsible for: Designing the logical and physical schemas, as well as widely-used portions of the external schema. Security and authorization. Data availability and recovery from failures. Database tuning: The DBA is responsible for evolving the database, in particular the conceptual and physical schemas, to ensure adequate performance as user requirements change. Unless the DBA understands the performance needs of widely used queries, and how the DBMS will optimize and execute these queries, good design and tuning decisions cannot be made. Exercise 1.6 Scrooge McNugget wants to store information (names, addresses, descriptions of embarrassing moments, etc.) about the many ducks on his payroll. Not surprisingly, the volume of data compels him to buy a database system. To save money, he wants to buy one with the fewest possible features, and he plans to run it as a stand-alone application on his PC clone. Of course, Scrooge does not plan to share his list with anyone. Indicate which of the following DBMS features Scrooge should pay for; in each case, also indicate why Scrooge should (or should not) pay for that feature in the system he buys. A security facility is necessary because Scrooge does not plan to share his list with anyone else. Even though he is running it on his stand-alone PC, a rival duckster could break in and attempt to query his database. The database s security features would foil the intruder. Concurrency control is not needed because only he uses the database. Crash recovery is essential for any database; Scrooge would not want to lose his data if the power was interrupted while he was using the system. A view mechanism is needed.

Scrooge could use this to develop custom screens that he could conveniently bring up without writing long queries repeatedly. A query language is necessary since Scrooge must be able to analyze the dark secrets of his victims. In particular, the query language is also used to define views. Exercise 1.7 Which of the following plays an important role in representing information about the real world in a database. Explain briefly. 1. The data definition language. 2. The data manipulation language. 3. The buffer manager. 4. The data model. Answer 1.7 Let us discuss the choices in turn. The data definition language is important in representing information because it is used to describe external and logical schemas. The data model is fundamental to representing information. The data model determines what data representation mechanisms are supported by the DBMS. The data definition language is just the specific set of language constructs available to describe an actual application s data in terms of the data model. Exercise 1.8 Describe the structure of a DBMS. If your operating system is upgraded to support some new functions on OS files (e.g., the ability to force some sequence of bytes to disk), which layer(s) of the DBMS would you have to rewrite to take advantage of these new functions? Answer 1.8 The architecture of a relational DBMS typically consists of a layer that manages space on disk, a layer that manages available main memory and brings disk pages into memory as needed, a layer that supports the abstractions of files and index structures, a layer that implements relational operators, and a layer that parses and optimizes queries and produces an execution plan in terms of relational operators. In addition, there is support for concurrency control and recovery, which interacts with the buffer management and access method layers. The disk space management layer has to be rewritten to take advantage of the new functions on OS files.

It is likely that the buffer management layer will also be affected. Exercise 1.9 Answer the following questions: 1. What is a transaction? 2. Why does a DBMS interleave the actions of different transactions instead of executing transactions one after the other? 3. What must a user guarantee with respect to a transaction and database consistency. What should a DBMS guarantee with respect to concurrent execution of several transactions and database consistency? 4. Explain the strict two-phase locking protocol. 5. What is the WAL property, and why is it important? Answer 1.9 Let us answer each question in turn: Transactions from these users can be interleaved to improve the execution time of users queries. By interleaving queries, users do not have to wait for other user s transactions to complete fully before their own transaction begins. Without interleaving, if user A begins a transaction that will take 10 seconds to complete, and user B wants to begin a transaction, user B would have to wait an additional 10 seconds for user A s transaction to complete before the database would begin processing user B s request. 3. A user must guarantee that his or her transaction does not corrupt data or insert nonsense in the database. For example, in a banking database, a user must guarantee that a cash withdraw transaction accurately models the amount a person removes from his or her account. A database application would be worthless if a person removed 20 dollars from an ATM but the transaction set their balance to zero. A DBMS must guarantee that transactions are executed fully and independently of other transactions. An essential property of a DBMS is that a transaction should execute atomically, or as if it is the only transaction running. Also, transactions will either complete fully, or will be aborted and the database returned to it s initial state. This ensures that the database remains consistent. 4.

Strict two-phase locking uses shared and exclusive locks to protect data. A transaction must hold all the required locks before executing, and does not release any lock until the transaction has completely finished. 5. The WAL property affects the logging strategy in a DBMS. The WAL, Write- Ahead Log, property states that each write action must be recorded in the log (on disk) before the corresponding change is reflected in the database itself. This protects the database from system crashes that happen during a transaction s execution. By recording the change in a log before the change is truly made, the database knows to undo the changes to recover from a system crash. Otherwise, if the system crashes just after making the change in the database but before the database logs the change, then the database would not be able to detect his change during crash recovery. A toy department employee entity could have attributes describing the employee s name, salary, and years of service. Domain - a set of possible values for an attribute. Entity - an object in the real world that is distinguishable from other objects such as the green dragon toy. Relationship - an association among two or more entities. Entity set - a collection of similar entities such as all of the toys in the toy department. Relationship set - a collection of similar relationships One-to-many relationship - a key constraint that indicates that one entity can be associated with many of another entity. An example of a one-to-many relationship is when an employee can work for only one department, and a department can have many employees. Many-to-many relationship - a key constraint that indicates that many of one entity can be associated with many of another entity. An example of a manyto-many relationship is employees and their hobbies: a person can have many different hobbies, and many people can have the same hobby. 7 An example is if every department entity has a manager entity.

Participation constraints can either be total or partial. A total participation constraint says that every department has a manager. A partial participation constraint says that every employee does not have to be a manager. Overlap constraint - within an ISA hierarchy, an overlap constraint determines whether or not two subclasses can contain the same entity. Covering constraint - within an ISA hierarchy, a covering constraint determines where the entities in the subclasses collectively include all entities in the superclass. For example, with an Employees entity set with subclasses HourlyEmployee and SalaryEmployee, does every Employee entity necessarily have to be within either HourlyEmployee or SalaryEmployee. Weak entity set - an entity that cannot be identified uniquely without considering some primary key attributes of another identifying owner entity. An example is including Dependent information for employees for insurance purposes. Aggregation - a feature of the entity relationship model that allows a relationship set to participate in another relationship set. This is indicated on an ER diagram by drawing a dashed box around the aggregation. Role indicator - If an entity set plays more than one role, role indicators describe the different purpose in the relationship. An example is a single Employee entity set with a relation Reports-To that relates supervisors and subordinates. Exercise 2.2 A university database contains information about professors (identified by social security number, or SSN) and courses (identified by courseid). Professors teach courses; each of the following situations concerns the Teaches relationship set. For each situation, draw an ER diagram that describes it (assuming no further constraints hold). 1. Professors can teach the same course in several semesters, and each offering must be recorded. 2. Professors can teach the same course in several semesters, and only the most recent such offering needs to be recorded.

(Assume this condition applies in all subsequent questions.) 3. Every professor must teach some course. 4. Every professor teaches exactly one course (no more, no less). 5. Every professor teaches exactly one course (no more, no less), and every course must be taught by some professor. Model this situation, introducing additional entity sets and relationship sets if necessary. Answer The ER diagram is shown in Figure The ER diagram is shown in Figure The ER diagram is shown in Figure The ER diagram is shown in Figure The ER diagram is shown in Figure The E.R. diagram is shown in Figure 2.6. An additional entity set called Group is introduced to identify the professors who team to teach a course. We assume that only the latest offering of a course needs to be recorded. Exercise 2.3 Consider the following information about a university database: Projects have a project number, a sponsor name (e.g., NSF), a starting date, an ending date, and a budget. Graduate students have an SSN, a name, an age, and a degree program (e.g., M.S. or Ph.D.). Each project is managed by one professor (known as the project s principal investigator). Each project is worked on by one or more professors (known as the project s co-investigators). Each project is worked on by one or more graduate students (known as the project s research assistants). When graduate students work on a project, a professor must supervise their work on the project. Graduate students can work on multiple projects, in which case they will have a (potentially different) supervisor for each one. Departments have a department number, a department name, and a main office. Departments have a professor (known as the chairman) who runs the department. Graduate students have one major department in which they are working on their degree. Each graduate student has another, more senior graduate student (known as a student advisor) who advises him or her on what courses to take.

Design and draw an ER diagram that captures the information about the university. Use only the basic ER model here; that is, entities, relationships, and attributes. Be sure to indicate any key and participation constraints. Answer 2.3 The ER diagram is shown in Figure 2.7. Exercise 2.4 A company database needs to store information about employees (identified by ssn, withsalary and phone as attributes), departments (identified by dno, with dname and budget as attributes), and children of employees (with name and age as attributes). Employees work in departments; each department is managed by an employee; a child must be identified uniquely by name when the parent (who is an employee; assume that only one parent works for the company) is known. We are not interested in information about a child once the parent leaves the company. Draw an ER diagram that captures this information. Answer 2.4 The ER diagram is shown in Figure 2.8. Exercise 2.5 Notown Records has decided to store information about musicians who perform on its albums (as well as other company data) in a database. Each musician that records at Notown has an SSN, a name, an address, and a phone number. Poorly paid musicians often share the same address, and no address has more than one phone. Each instrument used in songs recorded at Notown has a unique identification number, a name (e.g., guitar, synthesizer, flute) and a musical key (e.g., C, B-flat, E-flat). Each album recorded on the Notown label has a unique identification number, a title, a copyright date, a format (e.g., CD or MC), and an album identifier. Each song recorded at Notown has a title and an author. Each album has a number of songs on it, but no song may appear on more than one album. Each song is performed by one or more musicians, and a musician may perform a number of songs. Each album has exactly one musician who acts as its producer. A musician may produce several albums, of course.

Design a conceptual schema for Notown and draw an ER diagram for your schema. The preceding information describes the situation that the Notown database must model. Be sure to indicate all key and cardinality constraints and any assumptions you make. Identify any constraints you are unable to capture in the ER diagram and briefly explain why you could not express them. Answer 2.5 The ER diagram is shown in Figure 2.9. Exercise 2.6 Computer Sciences Department frequent fliers have been complaining to Dane County Airport officials about the poor organization at the airport. As a result, the officials decided that all information related to the airport should be organized using a DBMS, and you have been hired to design the database. Your first task is to organize the information about all the airplanes stationed and maintained at the airport. The relevant information is as follows: Every airplane has a registration number, and each airplane is of a specific model. The airport accommodates a number of airplane models, and each model is identified by a model number (e.g., DC-10) and has a capacity and a weight. A number of technicians work at the airport. You need to store the name, SSN, address, phone number, and salary of each technician. Each technician is an expert on one or more plane model(s), and his or her expertise may overlap with that of other technicians. This information about technicians must also be recorded. Traffic controllers must have an annual medical examination.For each traffic All airport employees (including technicians) belong to a union. You must store the union membership number of each employee. You can assume that each employee is uniquely identified by a social security number. Each test has a Federal Aviation Administration (FAA) test number, a name, and a maximum possible score. The FAA requires the airport to keep track of each time a given airplane is tested by a given technician using a given test.

For each testing event, the information needed is the date, the number of hours the technician spent doing the test, and the score the airplane received on the test. 1. Draw an ER diagram for the airport database. Be sure to indicate the various attributes of each entity and relationship set; also specify the key and participation constraints for each relationship set. Specify any necessary overlap and covering constraints as well (in English). 2. The FAA passes a regulation that tests on a plane must be conducted by a technician who is an expert on that model. How would you express this constraint in the ER diagram. If you cannot express it, explain briefly. Answer 2.6 The ER diagram is shown in Figure Since all airline employees belong to a union, there is a covering constraint on the Employees ISA hierarchy. 2. You cannot note the expert technician constraint the FAA requires in an ER diagram. There is no notation for equivalence in an ER diagram and this is what is needed: the Expert relation must be equivalent to the Type relation. Exercise 2.7 The Prescriptions-R-X chain of pharmacies has offered to give you a free lifetime supply of medicine if you design its database. Given the rising cost of health care, you agree. Here s the information that you gather: Patients are identified by an SSN, and their names, addresses, and ages must be recorded. Doctors are identified by an SSN. For each doctor, the name, specialty, and years of experience must be recorded. Each pharmaceutical company is identified by name and has a phone number. For each drug, the trade name and formula must be recorded. Each drug is sold by a given pharmaceutical company, and the trade name identifies a drug uniquely from among the products of that company. If a pharmaceutical company is deleted, you need not keep track of its products any longer. Each pharmacy has a name, address, and phone number. View more When would it make sense not to use a database system?

Answer University of Wisconsin Madison, WI, USA University of Wisconsin Madison, WI, USA CONTENTS PREFACE iii 1 INTRODUCTION TO DATABASE SYSTEMS 1 2 THE ENTITY-RELATIONSHIP MODEL Queries can be written intuitively, and the DBMS is responsible Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc. Legacy systems in older models University of Wisconsin Madison, WI, USA University of Wisconsin Madison, WI, USA 2 THE ENTITY-RELATIONSHIP MODEL Exercise 2.1 Explain the following terms briefly: attribute, ER Model Basics: Relationships. Ternary Relationships. Yanlei Diao UMass Amherst Why Study the Relational Model. Relational Database: Definitions. Chapter 3 Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle, Sybase, Why Study the Relational Model. Relational Database: Definitions Most widely used model. Vendors: IBM, Microsoft, Oracle, Sybase, etc. Legacy systems in The Entity- Relationship Model. Conceptual Design. Steps in Database Design. ER Model Basics. ER Model Basics (Contd. And I think what we got on our hands is a dead shark. Woody What Is a DBMS? DBMS Types DBMS Advantages of DBMS Data model Levels of abstraction Transaction management DBMS Why Study the Relational Model? How do we represent and store data in a DBMS? How does it support concurrent access What are the best possible primary keys in each relation.Instructor: Oliver Schulte The Relational Model. MS SQL Server. Instructions: Check the instructions If so, this is a participation constraint: the participation of Departments in Manages is said to be total (vs. partial). Every did Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys Introduction to XML and Relational Databases. Introduction to Databases. Why databases? Why not use XML? Why not use XML? What is missing from XML: Consistency Database Management System (DBMS) University Database Example Chapter 1: Introduction Database System Concepts, 6 th Ed. See www.db-book.

com for conditions on re-use Database Management System (DBMS) DBMS contains information Entity Type (con t) Chapter 4. Entity: an object that is involved in the enterprise Data Models. Review. Why Study the Relational Model. Steps in Database Design CREDITS: 04 LEARNING OUTCOMES On completion of this Why Use a DBMS? Why Study Databases?? Yanlei Diao Yanlei Diao CMPSCI 445 Midterm Practice Questions NAME: LOGIN: Write all of your answers directly on this paper. Be sure to clearly Database Application Examples: Banking: all transactions Physical design: Inputs. Table of Contents. A. Short Table of Contents Usually, there are two principles: 1 Capture Dr. Manuel Rodriguez Martinez Electrical and Computer Engineering Department Lecture 2 August 23, 2001 Victor Vianu 1 Data Management An evolving, expanding field: Classical stand-alone databases (Oracle, DB2, SQL Server) Computer science is becoming data-centric: Any Questions So Far. What This Course Cannot Do. Make sure that your answers are clear and to the point. Write your answers in the spaces provided. Practice Exercises. 4.1 Write the following queries in SQL: Rasmus Pagh Bibliography Database Systems Lecture 15 Natasha Alechina Dr. Hamid R. Nemati Physical Database Design Process. Major Inputs to Physical Database. Components of Physical Database Design A process of mapping the logical database structure developed in previous stages into internal The weight of each problem is stated. You have 4 hours to answer all A collection Chapter 1 Introduction To use this website, you must agree to our Privacy Policy, including cookie policy. When would it make sense not to use a database system? A database system orA file system is software which is used forThat is all theThe DBMS functions have been tested and debugged which decreases development time.