DBMS Retest
DBMS Retest
DBMS Retest
Part A
(Answer all questions, 3 marks each)
1. Explain three schema architecture with figure
2. Distinguish between super key, candidate key and primary key using suitable example.
3. Differentiate between weak entity and strong entity in ER model
4. How is clustering index different from primary index?
5. Explain lost update problem with a suitable example
(5 x 3 = 15 marks)
Part B
(Answer any five questions, 7 marks each)
6. Consider the following ER diagram. Map to relational model, execute the seven step algorithm.
7. Consider the following description of entities for the bank database (Primary keys are
underlined):
Customer (customer-name, customer-street, customer-city)
Branch (branch-name, branch-city, assets)
Account (account-number, branch-name, balance)
Borrower (customer-name, loan-number)
Depositor (customer-name, account-number)
Loan (loan-number, branch-name, amount)
Draw the ER diagram with suitable relationships between the entities.
8. For the relation schema below, give an expression in SQL for each of the queries that follows:
employee(employee-name, street, city)
works(employee-name, company-name, salary)
company(company-name, city)
manages(employee-name, manager-name)
i) Find the names, street address, and cities of residence for all employees who work for the
Company ‘ACB Inc.' and earn more than $15,000.
ii) Find the names of all employees who live in the same cities as the companies for which they
work.
iii) Find the names of all employees who do not work for ‘ XYZ Inc.’. Assume that all people
work for exactly one company.
iv) Find the names of all employees who earn more than every employee of ‘ABC Corporation'.
Assume that all people work for at most one company.
9. Explain extendible hashing with a suitable example. Illustrate the bucket splitting and merging
operations.
10. Consider a file with 2,00,000 records stored in a disk with fixed length blocks of size 256 bytes.
Each record is of size 50 bytes. The primary key is 4 bytes and block pointer is 6 bytes. Compute
the following, assuming that multi-level primary index is used as access path:
(i) Blocking factor for data records
(ii) Blocking factor for index records
(iii) Number of data blocks
(iv) Number of First level index blocks
(v) Number of levels of multi level index
11. (a) Write an algorithm to compute the closure of a set of attributes (X) under a set of functional
dependencies (F). (3 Marks)
What are Armstrong’s axioms? (2 Marks)
Differentiate 3NF and BCNF with suitable examples. (2 Marks)
12. Consider the transactions T1, T2, and T3.
T1: r1(X); r1(Z); w1(X); w1(Z)
T2: r2(Y); r2(Z); w2(Z)
T3: r3(Y); r3(X); w3(Y)
For the given non serial schedule S given below, check conflict-serializabality
S: r1(X); r3(Y); r3(X); r2(Y); r2(Z); w3(Y); w2(Z); r1(Z); w1(X); w1(Z)
If the schedule is conflict-serializable, find the equivalent serial schedule.
(b) Explain ACID properties of database transaction
(5 x 7 = 35 marks)