# Code No: RR411004

Set No. 1

IV B.Tech I Semester Supplementary Examinations, February 2007 DATA BASE MANAGEMENT SYSTEMS ( Common to Electronics & Instrumentation Engineering and Electronics & Control Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. (a) What is a Domain key constraint ? why are such constraints important ? [9] (b) Explain the following i. Relational Cardinality ii. Relational degree iii. Domain 2. (a) Explain with an example in SQL i. ii. iii. iv. Unspeciﬁed where-clause and use of Asterisk Exist and not exists Explicit sets and NULLS Renaming attributes and joined tables.

[2+2+3]

[2+2+2+2]

(b) Consider the following scheme for the COMPANY database. The primary keys are underlined. Employee (SSN, Fname, Lname, Birthdate, Address, Salary, Dnumber) Department (Dnumber, Dname, Dlocation) Perform the following operations using SQL. Assume the data: i. Insert a record into employee table ii. Delete an employee with SSN equal to 10. iii. Update the Dnumber of the employee tuple having salary greater than Rs 10,000. iv. Retrieve the name and address of all employees who work for the ”XYZ” department. [2+2+2+2] 3. Give algorithms for inserting a new key into a B-tree [16]

4. Discuss the implementation of a select operation. Explain the processing mechanism by means of an example. [16] 5. (a) Write short notes on - cost-based optimization - heuristic optimization (b) Detail on the structure of query optimization. [5+5+6]

6. (a) Explain functional dependencies and multivalued dependencies with examples.

1 of 2

Code No: RR411004 (b) Consider the relation R(A,B,C,D,E,F) and FD’s A → BC C →A D →E F →A E →D

Set No. 1

is the decomposition of R into R1 (A,C,D), R2 (B,C,D) and R3 (E,F,D) loss less? Explain the requirement of loss less decomposition. [8+8] 7. (a) Explain the concept of log based recovery. (b) Brieﬂy explain why recovery is needed. 8. (a) Explain the purpose of the check(D)point mechanism. (b) How does the frequency of check point aﬀects the following: i. System performance when no failure occurs. ii. The time it takes to recovery from a system crash. iii. The time it takes to recover from a disk crash. ⋆⋆⋆⋆⋆ [10+6] [5]

[3+4+4]

2 of 2

Code No: RR411004

Set No. 2

IV B.Tech I Semester Supplementary Examinations, February 2007 DATA BASE MANAGEMENT SYSTEMS ( Common to Electronics & Instrumentation Engineering and Electronics & Control Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. List and explain the various operations of Relational algebra. 2. (a) Consider the following schema Employee (employee-name, street, city) Works (employee-name, company-name, salary) Company (Company-name, city) Managers ( employee-name, manager-name) Write the following queries in SQL . i. Find the names and cities of residence of all employees who work for ﬁrst bank corporation. ii. Find the names, Street address, and cities of residence of all employees who work for ﬁrst Bank corporation and earn more than \$10, 000. iii. Find all employees in the database who live in the same cities and on the same streets as do their managers. iv. Find all employees in the database who do not work for ﬁrst Bank corporation. [2+2+3+3] (b) Describe about embedded SQL in examples. 3. (a) Write a note on secondary indexes. (b) Write a note on sparse and dense indexes. [8+8] [6] [16]

4. Discuss in detail about duplicate elimination, projection, set operators outer join and aggregation. [16] 5. Show that the following equivalences hold and explain how they can be applied to improve the eﬃciency of certain updates. (a) (r1 ∪ r2) ∪ r3 = r1 ∪ (r2 ∪ r3) (b) r1 ∪ r2 = r2 = r2 ∪ r3 (c) σp (r1 − r2) = σp(r1) − σp (r2) 6. (a) Explain why the PJNF is more desirable normal form than 4NF. (b) Explain Domain Key Normal Form(DKNF) with example. 7. (a) Explain Binary locks, Shared Locks and Exclusive locks ? [8+8] [5+4+7]

1 of 2

Code No: RR411004

Set No. 2

(b) What is the two phase locking protocal? How does is guarantee serializability. [6+10] 8. (a) What are diﬀerent Recovery Techniques used in Transaction Failures? (b) Explain how System Crash and Media Failure occurs? ⋆⋆⋆⋆⋆ [10+6]

2 of 2

Code No: RR411004

Set No. 3

IV B.Tech I Semester Supplementary Examinations, February 2007 DATA BASE MANAGEMENT SYSTEMS ( Common to Electronics & Instrumentation Engineering and Electronics & Control Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. (a) Discuss the diﬀerences between a ﬁle processing system and DBMS. (b) Explain the functions of DBA? 2. (a) what are the various salient features of the QBE ? (b) Explain the following : i. ii. iii. iv. Relational database query. Query language SQL Embedded SQL. [10+6] [7]

[2+2+2+3]

3. (a) Describe three popular ﬁle organization techniques on disks and compare them. (b) Discuss the process of disk initialization. [9+7] 4. (a) Design a variant of the hybrid merge join algorithm for the case where both relations are not physically sorted, but both have a sorted secondary index on the join attributes. (b) Show that with n relations, there are (2(n-1)) ! / (n-1) ! diﬀerent join orders. [8+8] 5. Discuss in detail about estimating the cost of an evaluation plan for a query block. [16] 6. (a) Explain why the PJNF is more desirable normal form than 4NF. (b) Explain Domain Key Normal Form(DKNF) with example. 7. (a) Explain Binary locks, Shared Locks and Exclusive locks ? (b) What is the two phase locking protocal? How does is guarantee serializability. [6+10] 8. (a) Write short notes on i. Write-Ahead log protocol ii. Check pointing (b) Explain how a System Crash can be recovered using ARIES algorithm? ⋆⋆⋆⋆⋆ 1 of 1 [4+4] [8] [8+8]

Code No: RR411004

Set No. 4

IV B.Tech I Semester Supplementary Examinations, February 2007 DATA BASE MANAGEMENT SYSTEMS ( Common to Electronics & Instrumentation Engineering and Electronics & Control Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. (a) Explain the following with an example: i. ii. iii. iv. Primary Key Secondary Key Super Key Foreign Key.

[3+2+2+3] [6]

(b) Explain the relation schema and relation instance with examples.

2. (a) What are views? Discuss the problems encountered in modifying database through views. (b) What is an embedded SQL? Give examples. 3. (a) Write a note on secondary indexes. (b) Write a note on sparse and dense indexes. 4. (a) Describe in detail the structure of query optimizers. (b) When must we create a nonclustering index despite the advantages of a clustering index? Explain. [8+8] 5. (a) What is indexing ? Explain with an example. (b) Explain about query processing. [8+8] [8+8] [10+6]

6. (a) Construct an E-R diagram for university registrar’s oﬃce. The oﬃce maintains data about each class, including the instructor, the enrollment and the time and place of the class meetings. For each student class pair, a grade is recorded. Determine the entities and relationships that exist between the entities. Also construct the tabular representation of the entities and relationships. (b) What is an entity type? What is an entityset? Explain the diﬀerence between the entity, entity type and entityset? [10+6] 7. (a) Explain timestamp ordering with an algorithm. (b) Explain diﬀerent locking Techniques for concurrency control. [8+8]

8. (a) When a system recovers from a crash ? In what order must transaction be Undone and Redone? Why is this order important? (b) What is a log in the content of DBMS? How does check pointing eliminate some of the problems associated with log based recovery? [8+8] 1 of 2

Code No: RR411004 ⋆⋆⋆⋆⋆

Set No. 4

2 of 2