Sie sind auf Seite 1von 2

IDEAL INSTITUTE OF TECHNOLOGY, GZB.

Department of IT Pre-Semester Examination Even (2012-13) Subject: Database Management System Max Marks/Time duration: 100 /3 hrs Subject Code: ECS-402 Year/Semester: 2nd/IV
Section A All questions are compulsory. (10x2=20) 1) Distinguish between a File Processing System and a Database Management System. 2) Define DBMS. Explain homogeneous & heterogeneous DBMS? 3) List the role of DBA in DBMS. 4) Explain the following terms: (a) Entity Integrity (b)Referential Integrity (c) Key Constraints (d) Domain Constraints 5) Consider the schema S= (V,W,X,Y,Z). The following functional dependencies hold for S: ZV, WY, XYZ, VWX State whether the following decompositions of S are lossless: a) S1= (V,W,X) S2= (V,Y,Z) b) S1= (V,W,X) S2= (X,Y,Z) 6) Discuss Join Dependency and Fifth Normal Form(5NF). Why is 5NF also called Project Join Normal Form? 7) What is a deadlock? How do we detect deadlocks in a system? 8) Define Fourth Normal Form with an example. 9) What is two-phase locking? Explain with an example. Can a deadlock occur in 2PL? 10) Explain the multiversion scheme for concurrency control. Section B Attempt any 3 questions. (10x3=30) 1) A university registrar's office maintains data about the following entities: (a)courses, including number, title, credits, syllabus, and prerequisites; (b) course offerings, including course number, year, semester, section number, instructor(s), timings, and classroom; (c) students, including student-id, name, and program; and (d) instructors, including identification number, name, department, and title. Further, the enrollment of students in courses and grades awarded to students in each course they are enrolled for must be appropriately modeled. Construct an Entity-Relationship Diagram for this database. 2) Consider the following relational schema: Emp( eid, ename, age, salary) Works ( eid, did, pcttime) Dept ( did, dname, budget, managerid) Answer each of the following questions briefly: a) Give an example of a foreign key constraint that involves the Dept relation. b) Write SQL statements to create the given relations, including primary and foreign key constraints. c) Define the Dept relation in SQL so that every department is guaranteed to have a manger. d) Write a SQL statement to add John Doe as an employee with eid=101, age=23 and salary=15000. e) Write a SQL statement to give every employee a 10 percent raise in salary. 3) Consider the universal relation R= (A,B,C,D,E,F,G,H,I,J) and the following set of functional dependencies on R F={ABC, ADE, BF, FGH, DIJ} a) Determine the key for R. b)Normalize R into Third Normal Form (3NF). 4) What do you mean by Transaction System? Explain the properties of a transaction. How do we recover from transactions deadlock? 5) Write short notes on the following: a) Timestamp Ordering Protocol b)Validation Based Protocol.

Section C All questions are compulsory. 1) What are the different types of Keys associated with a relational database? Explain. OR Distinguish between a) Logical data independence and physical data independence. b) DDL and DML c) Nave user and specialized user. 2) Consider the following tables. P Q R A B C A B C J a b c c b a J1 b c a J2 b a c c a b J3 b c a Perform the following relational algebra operations: a) PUQ b) PQ c) P-Q and Q-P d) PxQ and QxR OR How does relational algebra differ from relational calculus? How are they similar? Explain.

(5x10=50)

3) What do you mean by Functional Dependency? Explain BCNF and 3NF with examples. OR You are given the following set of functional dependencies for a relation R(A,B,C,D,E,F), F ={ABC,DC AE,E F}. a. What are the keys of this relation? b. Is this relation in BCNF? If not, explain why by showing one violation. c. Is the decomposition (A,B,C,D) (B,C,D,E,F) a dependency preserving decomposition? If not, explain briefly. 4) Consider the three transactions T1, T2 and T3 and the schedules S1 and S2 given below. Draw the serializability (precedence) graph for S1 and S2. Are S1 and S2 serializable? T1 : r1(x); r1(z); w1(x); T2 : r2(z); r2(y); w2(z); w2(y); T3 : r3(x); r3(y); w3(y); S1 : r1(x); r2(z); r1(z); r3(x); r3(y); w3(y); r3(y); w2(z); w2(y); S2 : r1(x); r2 (z); r3(x); r1(z); r2(y); r3(y); w1(x); w2(z); w3(y); w2(y); OR Produce the Wait-for-Graph for the following transactions scenario and diagnose what is happening in the system based on the graph. Transactions Object(s) locked by Transaction Object(s) transaction is waiting for. T1 T2 T3 T4 T5 T6 T7 B C, J H G A, E D, I F A, C G, H D, E A C F E

5) What are locks? Differentiate between Shared Mode and Exclusive Mode locks. How can serializability be ensured using lock based protocols? How does upgrading and downgrading of locks take place in 2PL? Explain with an example. OR

What is recovery? Explain log based recovery in detail.


**********************************

Das könnte Ihnen auch gefallen