You are on page 1of 2

Page 1 of 2

www.vustuff.com
WWW.VUTUBE.EDU.PK
CS403 Database Management System
Final Term Examination - February 2005
Time Allowed: 150 Minutes

Please read the following instructions carefully before attempting any of the
questions:
1. Attempt all questions. Marks are written adjacent to each question.
2. Do not ask any questions about the contents of this examination from anyone.
a. If you think that there is something wrong with any of the questions, attempt
it to the best of your understanding.
b. If you believe that some essential piece of information is missing, make an
appropriate assumption and use it to solve the problem.
You are allowed to use MS VISIO to make diagrams. If you do so please remember to copy
and paste your code into the examination solution area.
**WARNING: Please note that Virtual University takes serious note of unfair means. Anyone found
involved in cheating will get an `F` grade in this course.

Total Marks: 55

Total Questions: 5

Question No. 1

Marks : 10

Consider the tablesbelow:


EMP(empNo, eName, job, mgr, hireDate, sal, comm, deptNo)
(mgr stores the empNo of employee who is manager of the department in which
employee
works, comm Stores the commission of the
an
employee)
DEPT(deptNo,
dName, loc)
Write the SQL statements for the following queries:
a) Display the names of all employees whose commission is greater than their
salary
increased by 10%
b) Display all employees' names and their hire dates and their managers' names and
hiredates for all employees who were hired before their
c) Determine
managers.the number of managers without listing
them.
d) List all employees grouped department wise.
e) Set the salaries of all employees to 20000 whose name contain the "DILDAR"
Question No. 2

Marks : 10

Do as appropriate:
a) A relation that has no partial functional dependencies is in ___________ normal form.
b) A transaction must acquire a ________ before doing any
operation.
c) A ________ is a simple identifier that serves to identify each transaction.
d) The primary goal of physical database design is data processing security.(T/F)
e) The last step in the design process is the ______________, which maps the local
conceptual schemas to physical storage devices available at the corresponding
f) Join
and subquery techniques may often be used to accomplish the same
sites.
task.(T/F)
g) The special value of the attribute is generally referred to as the ___________
h) A join is a relational operation that causes two common attributes to be combined
intosingle
a
composite attribute.(T/F)
i) The hierarchical data model is the most commonly used model in contemporary
database
applications.(T/F)
j) A ___________ key is an attribute in one table that acts as a primary key in another
table.
Question No. 3

Marks : 6

Consider the tables below:


(2,3,1)
a) Mention the major difference between B tree and B+ tree. How can selection of either
of them as an index implementation approach can affect the number of accesses
required
performing a particular relational operator (say SELECT)?
b) Consider the following relations:
Student(stud_id, stud_name, camp_add,
GPA)
Registration (stud_id, course_id, grade)
Following is a typical query against these relations:
SELECT STUDENT.STUD_ID, STUD_NAME,STUD_NAME,COURSE_ID,
GRADE
FROM STUDENT, REGISTRATION
WHERE STUDENT.STUD_ID=REGISTRATION.STUD_ID
AND GPA>3.0

Page 2 of 2
a. On what attributes should indexes be defined to speed up the above query?
Givethe reasons for each attribute
selected.
b. Write
SQL command to create indexes for each attribute you identified in (a).
When a student has not chosen a major at a university, the university often enters a
c)
of "Undecided"
value a default value or a way to represent the null
value?
Question No. 4

Marks : 15

Differentiate the following: 3 each


a) Nave and Sophisticated End Users.
b) Process numbers in Diagram 0, Context diagram and detailed DFD (in all three of them).
c) Clustered Verses Unclustered Indexes.
d) Tuple Relational Calculus & Domain Relational Calculus.
e) Total and partial participation of an entity.

Question No. 5

Marks : 14

Give short and precise answers of the


(2, 2, 2, 2, 2,4)
a) The order of non-conflicting operations does not matter in an interleaved schedule,
following:
why?
b) 2PL ensures serializability but generates deadlock, how?
c) What are the 3rd and 4th forms of normalization, explain with examples?
d) How do we represent a multi-valued attribute in E-R diagram?
e) Explain how can we say that granularity of locks effects concurrency?
f) Let a file have following set of key values:
{2,5,8,10,15,18,23,25,28,31,33}
Construct a B-Tree index assuming 4 key values per node. Also show the changes in
the
tree after the following operations:
1. insert 24
2. delete 2
3. insert 35
4. delete 18

You might also like