Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 8

Code No: 320505 Set No.

1
III B.Tech. II-Semester Supplementary Examinations, November-2003

DATABASE MANAGEMENT SYSTEMS


(Common to Computer Science and Engineering, Electronics and Computer
Engineering and Computer Science and Systems Engineering)
Time: 3 hours Max. Marks: 80
Answer any FIVE questions
All questions carry equal marks
---
1.a) Explain:
i) The data definition language
ii) The data manipulation language
iii) The buffer manager
iv) The data model
Which of the above plays an important role in representing information about the
real world in a database ?
b) Explain the responsibilities of a database manager?

2.a) What is an SQL ? Explain the various aspects of SQL..


b) Consider the following schema . 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 queries in SQL for the following
(i) Find the names of sailors who have reserved at least one boat.
(ii) Find the ages of sailors whose names begin and end with C and has
atleast four characters.
(iii) Find the names of sailors who have reserved a blue or a yellow boat.
(iv) Find the names of sailors who have reserved both a blue and a yellow
boat.
(v) Find the names of all sailors who have reserved blue boats but not
yellow boats.

3. Consider a book base with 50000 books, 10000 authors, 10 publishers, 20000
titles and 50 suppliers. Compile the storage requirement and accession time for
(a) hashed file organization (b) index file organization.

4.a) Explain about projection based on sorting.


b) Explain about projection based on hashing.
(Contd…2)
Code No:320505 :: 2 :: Set No.1

5.a) Why is it not desirable to force users to make an explicit choice of a query
processing strategy? Are there cases in which it is desirable for users to be aware
of the costs of competing query processing strategies? Explain.
b) What are the advantages and disadvantages of hash indices relative to B+ - tree
indices? How the type of index available influences the choice of query
processing strategy?

6.a) Describe the term multivalued dependency(MVD) Is the decomposition in 4NF


always dependency preserving and lossless? Justify your answer with the help of
an example.
b) What is join dependency? How is it different to that of multivalued dependency
and functional dependency? Give an example for join dependencies and
multivalued dependencies.

7.a) What information does the dirty page table and transaction table contain?
b) Give a short notes on recovery from deadlock.

8.a) What are different Recovery Techniques used in Transaction Failures?


b) Explain how System Crash and Media Failure occurs?

-*-*-*-
Code No: 320505 Set No.

2
III B.Tech. II-Semester Supplementary Examinations, November-2003

DATABASE MANAGEMENT SYSTEMS


(Common to Computer Science and Engineering, Electronics and Computer
Engineering and Computer Science and Systems 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) Primary Key (ii) Secondary Key (iii) Super Key (iv) Foreign Key.
b) Explain the relation schema and relation instance with examples.

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
b) Explain the GROUP BY and HAVING clauses.

3.a) Explain the limitations of static hashing. Explain how this is overcome in
dynamic hashing.
b) Write a note on indexed sequential files.

4. Discuss the merits and demerits of hash join, sort-merge join and block nested
loops join.

5. Write short notes on the following.


(i) SQL query translation process. (ii) Equivalences of relational algebra.

6.a) Decompose the relation R(A,B,C,D,E,F) with the following set of FDs into a
BCNF relation. FDs of the relation are
ABC->DE
AB->D
DE->ABCE
E->C
Is the decomposition lossless and dependency preserving.
b) “A decomposition in BCNF may be lossless and dependency preserving” is the
above statement correct? Explain with the help of an example to justify your
answer. How can BCNF be compared to 4NF?
(Contd…2)
Code No:320505 :: 2 :: Set No.2

7.a) Define the concept of a schedule for a set of concurrent transactions. Give a
suitable example.
b) Explain how does granularity of locking affect the performance of concurrency
control algorithm.

8. Explain WAL Protocol, UNDO algorithm, Check pointing and Media Recovery?

-*-*-*-
Code No: 320505 Set No.

3
III B.Tech. II-Semester Supplementary Examinations, November-2003

DATABASE MANAGEMENT SYSTEMS


(Common to Computer Science and Engineering, Electronics and Computer
Engineering and Computer Science and Systems Engineering)
Time: 3 hours Max. Marks: 80
Answer any FIVE questions
All questions carry equal marks
---

1.a) Explain the following with examples.


(i) relational schema (ii) relational database schema (iii) domain
(iv) cardinality of a relation (v) degree of a relation.
b) What is a domain constraint? Explain with the help of an example.

2.a) Explain with an example in SQL


(i) Unspecified where-clause and use of Asterisk
(ii) Exist and not exists
(iii) Explicit sets and NULLS
(iv) Renaming attributes and joined tables.
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.

3.a) Describe three popular file organization techniques on disks and compare them.
b) Discuss the process of disk initialization.

4. Give a detailed account of the following:


(a) Query evaluation plans.
(b) Pipelined evaluation.

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.
(Contd…
2)
Code No:320505 :: 2 :: Set No.3

6.a) Design a generalization-specialization hierarchy for a motor-vehicle sales


company. The company sells motor-cycles, passenger cars, vans and busses.
Justify your placement of attributes at each level of hierarchy. Explain why they
(attributes) should not be placed at higher or lower level? Convert the E-R
diagram so made to 3NF relational scheme.
b) Normalize the relation R(A,B,C,D,E,F,G,H) into the third normal form using the
following set of FDs:
AB->C
BC->D
CDE->ABH
BH->A
D->EF
Is the decomposition dependency preserving?

7. Explain the role of concurrency control in databases. Also describe the basic tree
protocol that ensures serializability of concurrent transactions.

8.a) Explain the difference between Log-based Crash recovery techniques and Shadow
paging.
b) What are the different types of System Failures?

-*-*-*-
Code No: 320505 Set No.

4
III B.Tech. II-Semester Supplementary Examinations, November-2003

DATABASE MANAGEMENT SYSTEMS


(Common to Computer Science and Engineering, Electronics and Computer
Engineering and Computer Science and Systems Engineering)
Time: 3 hours Max. Marks: 80
Answer any FIVE questions
All questions carry equal marks
---
1.a) Explain in detail about the conversion of an ER Model into the
corresponding Relational model
b) What is a foreign key constraint? Why is such constraints important? What is a
referential integrity?

2.a) Is QBE based upon relational algebra, tuple relational calculus, or domain
relational calculus ? Explain.
b) Is QBE relationally complete ? Explain.
c) What restrictions does QBE pose on update commands? Explain with example.

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

4. Discuss about the following:


i) The system R optimizer.
ii) The iterator interface for operators and access methods.

5. Discuss different types of parameters that are used in cost functions. Where is
this information kept?

6.a) Suppose the scheme R =(A,B,C,D,E) is decomposed into (A,B,C) and (A,D,E),
show that the decomposition is not a dependency preserving decomposition if the
following set of functional dependencies hold.
A->BC
CD->E
B->D
E->A
b) List all functional dependencies satisfied by the following relation
A B C
a1 b1 c1
a1 b1 c2
a2 b1 c1
a2 b1 c3
(Contd…2)
Code No:320505 :: 2 :: Set No.4

7.a) Explain timestamp ordering with an algorithm


b) Explain different locking Techniques for concurrency control.

8.a) If a system fails repeatedly during recovery, what is the maximum number of
log records that can be written (as a function of number of update and other
log records written before crash) before restart completes successfully.
b) What is the oldest log record that we need to retain?
c) If a bounded amount of stable storage is needed for the log, how can we ensure
that there is always enough stable storage to hold all log records written during
restart?

-*-*-*-

You might also like