You are on page 1of 7

Code No: RR420207 Set No.

1
IV B.Tech II Semester Supplimentary Examinations, May 2008
DATA BASE MANAGEMENT SYSTEMS
(Electrical & Electronic Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) What is join ? Explain the several variants of join.


(b) Define the division operation in relational algebra. Show that it can be derived
from the primitive operations defined in the relational algebra. [10+6]

2. (a) Give the various methods of managing data security.


(b) Describe the “dynamic SQL”. [8+8]

3. (a) What are the differences between static and dynamic files.
(b) Discuss the techniques for allocating file blocks on disk. [8+8]

4. (a) Discuss in detail the steps involved in processing a query.


(b) Explain any one of the algorithms for computing the join of relations. [8+8]

5. (a) Discuss the reasons for converting SQL queries into relational algebra queries
before optimization is done.
(b) What is meant by query execution plan? Explain its significance. [10+6]

6. (a) Let R=(A,B,C,D,E) and let M be the following set of multivalued dependencies
A− >> BC
B− >> CD
E− >> AD
List the nontrivial dependencies in M+
(b) Describe the properties of normalized and unnormalized relations. [10+6]

7. (a) Consider two transactions as follows:


Transaction 1: Fac salary:=Fac salary+1025.00
Transaction 2: Fac salary:= Fac salary *1.1
What precaution, if any, would you suggest if these were to run concurrently?
Write a pseudo code program for these transactions using an appropriate
scheme to avoid undesirable results.
(b) Explain Wait-die and Wound-wait in Deadlock prevention? [8+8]

8. Describe the shadow paging recovery technique. Under what circumstances does it
not require a log. [16]

⋆⋆⋆⋆⋆

1 of 1
Code No: RR420207 Set No. 2
IV B.Tech II Semester Supplimentary Examinations, May 2008
DATA BASE MANAGEMENT SYSTEMS
(Electrical & Electronic Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) Explain Foreign key constraints with examples.


(b) Give Properties of Relations with examples.
(c) Explain General constraints with example. [5+5+6]

2. (a) Consider the following schema:


Suppliers (sid: integer, sname: string, address: string)
Parts (Pid: integer, pname; string, color: string)
Catalog ( Sid: integer, pid: integer, cost: real)
Write the following queries in SQL.
i. Find the names of suppliers who supply red part.
ii. Find the sids of suppliers who supply all parts.
iii. Find the pids of parts that are supplied by at least two different suppliers.
iv. Find the pids of the most expensive parts supplied by the suppliers named
TATA. [3+3+3+3]
(b) Why are null values not preferable in a relation. [4]

3. (a) Write a note on dense and sparse indexing.


(b) Write a note on fixed and variable length records. [8+8]

4. Give a detailed account of the following:

(a) Query evaluation plans.


(b) Pipelined evaluation. [8+8]

5. Write short notes on the following.

(a) SQL query translation process.


(b) Equivalences of relational algebra. [6+10]

6. (a) What do you understand by the mapping cardinalities?


(b) For the following relation scheme, tell whether it is in 3 NF or not. Employee
(E code,E name,Dname,salary,projectno,Termination dataof project) Where
each project no has unique termination dateof project.
Justify your answer, if it in not 3NF bring it into 3NF through normalization.
[6+10]

1 of 2
Code No: RR420207 Set No. 2
7. (a) Consider two transactions as follows:
Transaction 1: Fac salary:=Fac salary+1025.00
Transaction 2: Fac salary:= Fac salary *1.1
What precaution, if any, would you suggest if these were to run concurrently?
Write a pseudo code program for these transactions using an appropriate
scheme to avoid undesirable results.
(b) Explain Wait-die and Wound-wait in Deadlock prevention? [8+8]

8. Explain in detail the ARIES recovery method. [16]

⋆⋆⋆⋆⋆

2 of 2
Code No: RR420207 Set No. 3
IV B.Tech II Semester Supplimentary Examinations, May 2008
DATA BASE MANAGEMENT SYSTEMS
(Electrical & Electronic Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) Define with examples, the relation and relation schema.


(b) Explain the general syntax of SELECT command. [6+10]
2. (a) Give the various methods of managing data security.
(b) Describe the “dynamic SQL”. [8+8]
3. (a) Which of the three basic file organizations would you choose for a file where
the most frequent operations are as follows,
i. Search for records based on a range of field values.
ii. Perform insert and scans where the order of records does not matter.
iii. Search for a record based on a particular field value.
(b) Define dense index.
(c) How does multi level indexing improve the performance of searching an index
file. [6+4+6]
4. State and explain any six heuristic rules used in optimizing relational queries. [16]
5. (a) At what point during query processing does optimization occur.
(b) Consider the following SQL queries for a bank DB
select T.branch name
from branch T,branch S
where T.assets> S.assets
and S.branch city = ”Chennai”
Write an efficient relational-algebra expression that is equivalent to this query.
Justify
(c) What is multiple equivalence. How is multiple transformation done by the
following query?
Πcustomer name ( σbranch city = ”Chennai”(branch X (account X depositor)))
[4+6+6]
6. (a) Construct an E-R diagram for university registrar’s office. The office 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 difference between
the entity, entity type and entityset? [10+6]

1 of 2
Code No: RR420207 Set No. 3
7. (a) What information does the dirty page table and transaction table contain?
(b) Give a short notes on recovery from deadlock. [6+10]

8. (a) Discuss the un-do and re-do operations and the recovery techniques that use
each.
(b) Compare the shadow(D)paging recovery scheme with the log-based recovery
schemes in terms of case of implementation and overhead cost. [8+8]

⋆⋆⋆⋆⋆

2 of 2
Code No: RR420207 Set No. 4
IV B.Tech II Semester Supplimentary Examinations, May 2008
DATA BASE MANAGEMENT SYSTEMS
(Electrical & Electronic Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) Consider the following schema


Suppliers(sid, sname, saddress)
Parts(pid, pname, color)
Catalog(sid, pid, cost)
The key fields are underlined. Write the following queries in relational algebra
i. Find the names of suppliers who supply blue part
ii. Find the sids of suppliers who supply every red part
iii. Find the pids of parts that are supplied by at least two different suppliers
iv. Find all the pids of parts supplied by supplier with sid=200
v. Find the pids of parts supplied by every supplier at less than Rs 500.
[2+2+2+2+2]
(b) Given two relations R1 and R2 , where R1 contains N1 tuples, R2 contains
N2 tuples, and N2 > N1 > 0 , give the minimum and maximum possible sizes
(in tuples) for the result relation produced by each of the following relational
algebra expressions. In each case, state any assumptions about the schemas
for R1 and R2 that are needed to make the expression meaningful.
i. Selecting all the tuples from R1 where a=5
ii. Projecting the attribute b from R2
iii. R1 X R2 [2+2+2]

2. (a) Consider the following schema given. The primary keys are underlined.
Sailors(sailor-id, sailor-name, sailor-rating, sailor-age)
Boats(boat-id, boat-name, boat-color)
Reserves(sailor-id, boat-id, day)

Write the Nested queries in SQL.


i. Find the names of sailors who have reserved boat number 120
ii. Find the names of sailors who have reserved a green boat
iii. Find the names of sailors who have not reserved a green boat
iv. Find the names of sailors with the highest rating [2+2+3+3]
(b) Explain the GROUP BY and HAVING clauses. [6]

3. (a) Write a note on dense and sparse indexing.


(b) Write a note on fixed and variable length records. [8+8]

1 of 2
Code No: RR420207 Set No. 4
4. (a) Explain about projection based on sorting.
(b) Explain about projection based on hashing. [8+8]

5. (a) Discuss the reasons for converting SQL queries into relational algebra queries
before optimization is done.
(b) What is meant by query execution plan? Explain its significance. [10+6]

6. (a) Construct an E-R diagram for university registrar’s office. The office 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 difference between
the entity, entity type and entityset? [10+6]

7. Write short notes on

(a) dead lock.


(b) exclusive lock.
(c) binary lock.
(d) live lock. [4+4+4+4]

8. (a) Explain the database Recovery Technique based on Deferred Update


(b) What are the roles of Analysis, Redo and Undo phases in ARIES? [7+9]

⋆⋆⋆⋆⋆

2 of 2

You might also like