New Semester
Started
Get
50% OFF
Study Help!
--h --m --s
Claim Now
Question Answers
Textbooks
Find textbooks, questions and answers
Oops, something went wrong!
Change your search query and then try again
S
Books
FREE
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Tutors
Online Tutors
Find a Tutor
Hire a Tutor
Become a Tutor
AI Tutor
AI Study Planner
NEW
Sell Books
Search
Search
Sign In
Register
study help
computer sciences
databases
Fundamentals of Database Systems 6th edition Ramez Elmasri, Shamkant Navathe - Solutions
Show how you can specify the following relational algebra operations in both tuple and domain relational calculus. (a) SELECT A=c (R(A, B, C)): (b) PROJECT (R(A, B, C)): (c) R(A, B, C) NATURAL JOIN S(C, D, E): (d) R(A, B, C) UNION S(A, B, C): (e) R(A, B, C) INTERSECT S(A, B, C): (f) R(A, B, C)
A nested query is query within a query. More specifically, a nested query is a parenthesized query that can be used as a value in a number of places, such as instead of a relation or a selection condition. Specify the following queries on the database specified in Figure 3.5 using the concept of
Consider the following set of requirements for a UNIVERSITY database that is used to keep track of students' transcripts. This is similar but not identical to the database shown in Figure 1.2: (a) The university keeps track of each student's name, student number, social security number, current
Cardinality ratios often dictate the detailed design of a database. The cardinality ratio depends on the real-world meaning of the entity types involved and is defined by the specific application. For the binary relationships below, suggest cardinality ratios based on common-sense meaning of the
Illustrate the UML Diagram for exercise 7.16. Your UML design should observe the following requirements:a. The student should have the ability to compute his/her GPA and add or drop majors and minors.b. Each department should be to able add or delete courses and hire or terminate faculty.c. Each
Composite and multi-valued attributes can be nested to any number of levels. Suppose we want to design an attribute for a STUDENT entity type to keep track of previous college education. Such an attribute will have one entry for each college previously attended, and this entry is composed of:
Show an alternative design for the attribute described in Exercise 7.17 that uses only entity types (including weak entity types if needed) and relationship types.
Consider the ER diagram of Figure 7.20, which shows a simplified schema for an airline reservations system. Extract from the ER diagram the requirements and constraints that resulted in this schema. Try to be as precise as possible in your requirements and constraints specification.
A database is being constructed to keep track of the teams and games of a sports league. A team has a number of players, not all of whom participate in each game. It is desired to keep track of the players participating in each game for each team, the positions they played in that game, and the
Consider the ER diagram shown in Figure 7.21 for part of a BANK database. Each bank can have multiple branches, and each branch can have multiple accounts and loans.(a) List the strong (nonweak) entity types in the ER diagram.(b) Is there a weak entity type? If so, give its name, its partial key,
Consider the ER diagram in Figure 7.22. Assume that an employee may work in up to two departments or may not be assigned to any department. Assume that each department must have one and may have up to three phone numbers. Supply (min, max) constraints on this diagram. State clearly any additional
Consider the ER diagram in Figure 7.23. Assume that a course may or may not use a textbook, but that a text by definition is a book that is used in some course. A course may not use more than five books. Instructors teach from two to four courses. Supply (min, max) constraints on this diagram.
Consider an entity type SECTION in a UNIVERSITY database, which describes the section offerings of courses. The attributes of SECTION are SectionNumber, Semester, Year, CourseNumber, Instructor, RoomNo (where section is taught), Building (where section is taught), Weekdays (domain is the possible
Consider the BANK ER schema of Figure 7.21, and suppose that it is necessary to keep track of different types of ACCOUNTS (SAVINGS_ACCTS, CHECKING_ACCTS, ...) and LOANS (CAR_LOANS, HOME_LOANS, ...). Suppose that it is also desirable to keep track of each account's TRANSACTIONs (deposits,
Identify all the important concepts represented in the library database case study described here. In particular, identify the abstraction of classification (entity types and relationship types), aggregation, identification, and specialization/generalization. Specify (min, max) cardinality
Figure 8.12 shows an example of an EER diagram for a small private airport database that is used to keep track of airplanes, their owners, airport employees, and pilots. From the requirements for this database, the following information was collected: Each airplane has a registration number [Reg#],
Consider the following EER diagram that describes computer systems at a company. Provide your own attributes and key for each entity type. Supply max cardinality constraints justifying your choice. Write a complete narrative description of what this EER diagram represents.
Try to map the relational schema of Figure 6.14 into an ER schema. This is part of a process known as reverse engineering, where a conceptual schema is created for an existing implemented database. State any assumptions you make.
Figure 9.8 shows an ER schema for a database that may be used to keep track of transport ships and their locations for maritime authorities. Map this schema into a relational schema, and specify all primary keys and foreign keys.
Map the BANK ER schema of Exercise 7.23 (shown in Figure 7.21) into a relational schema. Specify all primary keys and foreign keys. Repeat for the AIRLINE schema (Figure 7.20) of Exercise 7.19 and for the other schemas for Exercises 7.16 through 7.24.
What are the current relational DBMSs that dominate the market? Pick one that you are familiar with and show how it measures up based on the criteria laid out in Section 10.2.3?
A possible DDL corresponding to Figure 3.1 is shown below:Discuss the following detailed design decisions: a. The choice of requiring NAME to be NON NULL. b. Selection of SSN as the PRIMARY KEY. c. Choice of field sizes and precision. d. Any modification of the fields defined in this
What naming conventions can you develop to help identify foreign keys more efficiently?
Convert the example of GEOMETRY_OBJECTS given in section 11.1.5 from the functional notation to the notation given in Figure 11.2 that distinguishes between attributes and operations. Use the keyword INHERIT to show that one class inherits from another class.
Compare inheritance in the EER model (see Chapter 8) to inheritance in the OO model described in Section 11.1.5.
Consider the UNIVERSITY EER schema of Figure 8.10. Think of what operations are needed for the entity types/classes in the schema. Do not consider constructor and destructor operations.
Consider the COMPANY ER schema of Figure 7.2. Think of what operations are needed for the entity types/classes in the schema. Do not consider constructor and destructor operations.
Map the COMPANY ER schema of Figure 7.2 into ODL classes. Include appropriate methods for each class.
Specify in OQL the queries in the exercises of Chapter 7 and 8 that apply to the COMPANY database.
Apply the Apriori algorithm to the following data set:Trans IDItems Purchased101 ....................................milk, bread, eggs102 ....................................milk, juice103 ....................................juice, butter104 ....................................milk, bread, eggs105
Show two rules that have a confidence of 0.7 or greater for an itemset containing three items from Exercise 28.14.
For the Partition algorithm, prove that any frequent itemset in the database must appear as a local frequent itemset in at least one partition.
Show the FP tree that would be made for the data from Exercise 28.14.
Apply the FP-growth algorithm to the FP tree from Exercise 28.17 and show the frequent item sets.
Apply the classification algorithm to the following set of data records. The class attribute is Repeat Customer.
Consider the following set of two-dimensional records:Also consider two different clustering schemes: (1) where Cluster 1 contains records {1, 2, 3} and Cluster 2 contains records {4, 5, 6} and (2) where Cluster 1 contains records {1, 6} and Cluster 2 contains records {2, 3, 4, 5}. Which scheme is
Use the K-means algorithm to cluster the data from Exercise 28.20. We can use a value of 3 for K and can assume that the records with RIDs 1, 3, and 5 are used for the initial cluster centroids (means).
The k-Means algorithm uses a similarly metric of distance between a record and a cluster centroid. If the attributes of the records are not quantitative but categorical in nature, such as Income Level with values {low, medium, high} or Married with values {yes, no} or State of Residence with values
Consider the COMPANY database described in Figure 3.6. Using the syntax of Oracle triggers, write active rules to do the following: (a) Whenever an employee's project assignments are changed, check if the total hours per week spent on the employee's projects are less than 30 or greater than 40; if
Repeat 26.34 but use the syntax of STARBURST active rules. In repeat 26.34 (a) Whenever an employee's project assignments are changed, check if the total hours per week spent on the employee's projects are less than 30 or greater than 40; if so, notify the employee's direct supervisor. (b) Whenever
Consider the relational schema shown in Figure 26.18. Write active rules for keeping the SUM_COMMISSIONS attribute of SALES_PERSON equal to the sum of the COMMISSION attribute in SALES for each sales person. Your rules should also check if the SUM_COMMISSIONS exceeds 100000; if it does, call a
Consider the UNIVERSITY EER schema of Figure 8.10. Write some rules (in English) that could be implemented via active rules to enforce some common integrity constraints that you think are relevant to this application.
Discuss which of the updates that created each of the tuples shown in Figure 26.9 were applied retroactively and which were applied proactively.
Consider the relational database schema of Figure 3.5. Suppose that all the relations were created by (and hence are owned by) user X, who wants to grant the following privileges to user accounts A, B, C, D, and E: (a) Account A can retrieve or modify any relation except DEPENDENT and can grant any
Suppose that privilege (a) of exercise 24.32 is to be given with GRANT OPTION but only so that account A can grant it to at most five accounts, and each of these accounts can propagate the privilege to other accounts but without the GRANT OPTION privilege. What would the horizontal and vertical
Consider the relation shown in Figure 24.2 (d). How would it appear to a user with classification U? Suppose a classification U user tries to update the salary of "Smith" to $50,000; what would be the result of this action?
Suppose we have the following requirements for a university database that is used to keep track of students' transcripts: (a) The university keeps track of each student's name (SNAME), student number (SNUM), social security number (SSSN), current address (SCADDR) and phone (SCPHONE), permanent
This exercise asks you to converting business statements into dependencies. Consider the following relation DiskDrive(serialNumber, manufacturer, model, batch, capacity, retailer). Each tuple in the relation DiskDrive contains information about a disk drive with a unique serialNumber, made by a
Consider the following relation:R (Doctor#, Patient#, Date, Diagnosis, Treat_code, Charge)In this relation, a tuple describes a visit of a patient to a doctor along with a treatment code and daily charge. Assume that diagnosis is determined (uniquely) for each patient by a doctor. Assume that
Consider the following relation:CAR_SALE (CarID, Option_type, Option_Listprice, Sale_date, Discounted_price)This relation refers to options installed on cars (e.g.- cruise control) that were sold at a dealership and the list and discounted prices for the options.If CarID ( Sale_date and
Consider the following relation: TRIP (trip_id, start_date, cities_visited, cards_used) This relation refers to business trips made by salesmen in a company. Suppose the trip has a single start_date but involves many cities and one may use multiple credit cards for that trip. Make up a mock-up
Consider the relation:BOOK (Book_Name, Author, Edition, Year) with the data:a. Based on a common-sense understanding of the above data, what are the possible candidate keys of this relation?b. Does the above have one or more functional dependency (do not list FDf.d.s by applying derivation rules)?
Consider the following relation for published books: BOOK (Book_title, Authorname, Book_type, Listprice, Author_affil, Publisher) Author_affil referes to the affiliation of the author. Suppose the following dependencies exist: Book_title -> Publisher, Book_type Book_type -> Listprice Author_name
Consider the following relation: CAR_SALE(Car#, Date_sold, Salesman#, Commision%, Discount_amt Assume that a car may be sold by multiple salesmen and hence {CAR#, SALESMAN#} is the primary key. Additional dependencies are: Date_sold ->Discount_amt and Salesman# ->commission% Based on the given
What update anomalies occur in the EMP_PROJ and EMP_DEPT relations of Figure 15.3 and 15.4?
In what normal form is the LOTS relation schema in Figure 15.12(a) with respect to the restrictive interpretations of normal form that take only the primary key into account? Would it be in the same normal form if the general definitions of normal form were used?
Why do spurious tuples occur in the result of joining the EMP_PROJ1 and EMPLOCS relations of Figure 15.5 (result shown in Figure 15.6)?
Prove that any relation schema with two attributes is in BCNF.
Consider the universal relation R = {A, B, C, D, E, F, G, H, I} and the set of functional dependencies F = { {A, B} -> {C}, {A} -> {D, E}, {B} -> {F}, {F} -> {G, H}, {D} -> {I, J} }. What is the key for R? Decompose R into 2NF, then 3NF relations.
Consider the relation R, which has attributes that hold schedules of courses and sections at a university; R = {CourseNo, SecNo, OfferingDept, CreditHours, CourseLevel, InstructorSSN, Semester, Year, Days_Hours, RoomNo, NoOfStudents}. Suppose that the following functional dependencies hold on
Repeat exercise 15.24 for the following different set of functional dependencies G = { {A, B} -> {C}, {B, D} -> {E, F}, {A, D} -> {G, H}, {A} -> {I}, {H} -> {J} }.
Consider the following relations for an order-processing application database at ABC, Inc. ORDER (O#, Odate, Cust#, Total_amount) ORDER-ITEM (O#, I#, Qty_ordered, Total_price, Discount%) Assume that each item has a different discount. The Total_price refers to one item, Odate is the date on which
Show that the relation schemas produced by Algorithm 15.4 are in 3NF.
Show that, if the matrix S resulting from Algorithm 15.3 does not have a row that is all "a" symbols, then projecting S on the decomposition and joining it back will always produce at least one spurious tuple.
Specify a template dependency for join dependencies.
Consider the relation REFRIG(MODEL#, YEAR, PRICE, MANUF_PLANT, COLOR), which is abbreviated as REFRIG(M, Y, P, MP, C), and the following set of F of functional dependencies: F={M -> MP, {M,Y} -> P, MP -> C}(a) Evaluate each of the following as a candidate key for REFRIG, giving reasons why
Prove that a functional dependency satisfies the formal definition of multi-valued dependency.
Consider a disk with the following characteristics (these are not parameters of any particular disk unit): block size B=512 bytes, interblock gap size G=128 bytes, number of blocks per track=20, number of tracks per surface=400. A disk pack consists of 15 double-sided disks. (a) What is the total
Suppose that a file initially contains r=120,000 records of R=200 bytes each in an unsorted (heap) file. The block size B=2400 bytes, the average seek time s=16 ms, the average rotational latency rd=8.3 ms and the block transfer time btt=0.8 ms. Assume that 1 record is deleted for every 2 records
Suppose we have a sequential (ordered) file of 100000 records where each record is 240 bytes. Assume that B=2400 bytes, s=16 ms, rd=8.3 ms, and btt=0.8 ms. Suppose we want to make X independent random records from the file. We could make X random block reads or we could perform one exhaustive read
Suppose that a static hash file initially has 600 buckets in the primary area and that records are inserted that create an overflow area of 600 buckets. If we reorganize the hash file, we can assume that the overflow is eliminated. If the cost of reorganizing the file is the cost of the bucket
Suppose we want to create a linear hash file with a file load factor of 0.7 and a blocking factor of 20 records per bucket, which is to contain 112,000 records initially. (a) How many buckets should we allocate in primary areas? (b) What should be the number of bits used for bucket addresses?
A file has r=20,000 STUDENT records of fixed-length. Each record has the following fields: NAME (30 bytes), SSN (9 bytes), ADDRESS (40 bytes), PHONE (9 bytes), BIRTHDATE (8 bytes), SEX (1 byte), MAJORDEPTCODE (4 bytes), MINORDEPTCODE (4 bytes), CLASSCODE (4 bytes, integer), and DEGREEPROGRAM (3
Suppose that only 80% of the STUDENT records from Exercise 17.28 have a value for PHONE, 85% for MAJORDEPTCODE, 15% for MINORDEPTCODE, and 90% for DEGREEPROGRAM, and we use a variable-length record file. Each record has a 1-byte field type for each field occurring in the record, plus the 1-byte
Suppose that a disk unit has the following parameters: seek time s=20 msec; rotational delay rd=10 msec; block transfer time btt=1 msec; block size B=2400 bytes; interblock gap size G=600 bytes. An EMPLOYEE file has the following fields: SSN, 9 bytes; LASTNAME, 20 bytes; FIRSTNAME, 20 bytes; MIDDLE
A PARTS file with Part# as hash key includes records with the following Part# values: 2369, 3760, 4692, 4871, 5659, 1821, 1074, 7115, 1620, 2428, 3943, 4750, 6975, 4981, 9208. The file uses 8 buckets, numbered 0 to 7. Each bucket is one disk block and holds two records. Load these records into the
Load the records of Exercise 17.31 into expandable hash files based on extendible hashing. Show the structure of the directory at each step. Show the directory at each step, and the global and local depths. Use the hash function h(k) = K mod 128.
Load the records of Exercise 17.31 into expandable hash files based on linear hashing. Start with a single disk block, using the hash function h ø = K mod 2º, and show how the file grows and how the hash functions change as the records are inserted. Assume that blocks are split whenever an
Can you think of techniques other than an unordered overflow file that can be used to make insertion in an ordered file more efficient?
Can you think of techniques other than chaining to handle bucket overflow in external hashing?
Consider a disk with block size B=512 bytes. A block pointer is P=6 bytes long, and a record pointer is P R =7 bytes long. A file has r=30,000 EMPLOYEE records of fixed-length. Each record has the following fields: NAME (30 bytes), SSN (9 bytes), DEPARTMENTCODE (9 bytes), ADDRESS (40 bytes), PHONE
A PARTS file with Part# as key field includes records with the following Part# values: 23, 65, 37, 60, 46, 92, 48, 71, 56, 59, 18, 21, 10, 74, 78, 15, 16, 20, 24, 28, 39, 43, 47, 50, 69, 75, 8, 49, 33, 38. Suppose the search field values are inserted in the given order in a B + -tree of order p=4
Suppose that the following search field values are deleted, in the given order, from the B + -tree of Exercise 18.19, show how the tree will shrink and show the final tree. The deleted values are: 65, 75, 43, 18, 20, 92, 59, 37.
Consider SQL queries Q1, Q8, Q1B, Q4, Q27 in Chapter 5. (a) Draw at least two query trees that can represented each of these queries. Under what circumstances would you use each of your query trees? (b) Draw the initial query tree for each of these queries; then show how the query tree is optimized
A file of 4096 blocks is to be sorted with an available buffer space of 64 blocks. How many passes will be needed in the merge phase of the external sort-merge algorithm?
Develop cost functions for the PROJECT, UNION, INTERSECTION, SET DIFFERENCE, and CARTESIAN PRODUCT algorithms discussed in section19.4.
Can a nondense (sparse) index be used in the implementation of an aggregate operator? Why or why not?
Calculate the cost functions for different options of executing the JOIN operation OP7 discussed in section 19.3.2.
Extend the sort-merge join algorithm to implement the LEFT OUTER JOIN operation.
Compare the cost of two different query plans for the following query: salary > 40000 select (EMPLOYEE |X| DNO=DNUMBER DEPARTMENT) Use the database statistics in Figure 15.8
Figure 23.6 shows the log corresponding to a particular schedule at the point of a system crash for the four transactions T1, T2, T3, and T4 of Figure 19.4. Suppose that we use the immediate update protocol with checkpointing. Describe the recovery process from the system crash. Specify which
Suppose that we use the deferred update protocol for the example in Figure 23.6. Show how the log would be different in the case of deferred update by removing the unnecessary log entries; then describe the recovery process, using your modified log. Assume that only redo operations are applied, and
How does checkpointing in ARIES differ from checkpointing as described in Section 23.1.4?
How are log sequence numbers used by ARIES to reduce the amount of REDO work needed for recovery? Illustrate with an example using the information shown in Figure 23.5. You can make your own assumptions as to when a page is written to disk.
What implications would a no-steal/force buffer management policy have on checkpointing and recovery?
Repeat Exercise 21.14 adding a check in T 1 so that Y does not exceed 90. In exercise 21.14 Change transaction T 2 in Figure 21.2b to read: read_item(X); X:= X+M; if X > 90 then exit else write_item(X);
Change transaction T 2 in Figure 21.2b to read: read_item(X); X:= X+M; if X > 90 then exit else write_item(X); Discuss the final result of the different schedules in Figure 21.3 (a) and (b), where M = 2 and N = 2, with respect to the following questions. Does adding the above condition change the
Add the operation commit at the end of each of the transactions T 1 and T 2 from Figure 21.2; then list all possible schedules for the modified transactions. Determine which of the schedules are recoverable, which are cascadeless, and which are strict.
List all possible schedules for transactions T 1 and T 2 from figure 21.2, and determine which are conflict serializable (correct) and which are not.
How many serial schedules exist for the three transactions in Figure 21.8 (a)? What are they? What is the total number of possible schedules?
Showing 2300 - 2400
of 3228
First
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Last
Step by Step Answers