0% found this document useful (0 votes)
6 views

2024_Database_Management_Systems (1)

The document is a question paper for a Database Management Systems course, containing instructions for candidates and two sections of questions. Section A includes compulsory questions related to Entity Relationship diagrams, SQL commands, and relational schemas, while Section B consists of additional questions on normalization, relational model constraints, and indexing. The paper is designed for a 3-hour exam with a maximum score of 90 marks.

Uploaded by

Vipul Rathore
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
6 views

2024_Database_Management_Systems (1)

The document is a question paper for a Database Management Systems course, containing instructions for candidates and two sections of questions. Section A includes compulsory questions related to Entity Relationship diagrams, SQL commands, and relational schemas, while Section B consists of additional questions on normalization, relational model constraints, and indexing. The paper is designed for a 3-hour exam with a maximum score of 90 marks.

Uploaded by

Vipul Rathore
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 9
(t- y) Bb. 2clos]24 [This question paper contains 16 printed pages.] Your Roll Nou... Sr. No. of Question Paper: 4095 H Unique Paper Code : 2342012402 Name of the Paper : Database Management Systems. Name of the Course : B.Se. (H) Computer Science Semester oT EY Duration : 3 Hours Maximum Marks : 90 Instructions for Candidates 1. Write your Roll No. on the top immediately on receipt of this question paper. 2. Section A is compulsory. 3. Attempt any FOUR questions from Section B. 4. Parts of a question should be attempted together. PO: 4095 2 : Section A 1. (a) Consider the following Entity Relationship diagram (ERD) for a ternary relationship ProjGuide. Map the given ER diagram to a relation schema. Gesets) Gontn) (@) ae > poe Geass Cm 2) =o! (b) Consider the following SQL statements : (@)) (i) CREATE TABLE Gi) SELECT (iii) INSERT (iv) CREATE VIEW (vy) DELETE (vi) ALTER TABLE , 4095 3 For cach of the above commands, indicate whether it is a Data Manipulation Language (DML) command, Data Definition Language (DDL) command, or View Definition Language (VDL) command, (c) Consider the following relations : 3) Employee(empID: integer, deptID: integer, empSalary: integer, empHobby: char (20)) Department(deptID: integer, deptName: char (20), deptFloor: integer) Which attributes will appear in the output on executing the following SQL queries? (i) SELECT * FROM Employee E NATURAL JOIN Department D; (ii) SELECT * FROM Employee E, Department D WHERE EF.deptlD = D.deptID; (d) Consider the following relations for a database that keeps track of business trips of salespersons working in a sales office: G) SALESPERSON (SSN, name, joiningDate, supervisorSSN) PTO. 4095 4 TRIP (tripID, SSN.fromCity, toCity, departureDate, returnDate) EXPENSE (tripID, accountNo, amount) The sales office maintains multiple bank accounts. A trip can be charged to one or more accounts. Specify the foreign keys for the above relations. (e) Consider the following relations Rand S: (3) Show the output for the following relational statements : @R Pt an-so § Gi) R Pdeoen § 4095 CA) (s (ny 5 Consider the following relational schema : (3) Suppliers(sID: integer, sName: string, address: string) Parts(pID: integer, pName: string. color: string) Catalog(sID: integer, pID: integer, cost: real) Write relational algebra expressions to perform the following : (i) Find the names of supplicrs who supply a red part. (ii) List the [Ds and names of parts with an entry in the table Catalog Identify multivalued and composite attributes from the following complex attribute (3) {Hobby_stats (Name (First_name, Last_name), {Phone (Area_code, Phone_number)}, {Hobbies} )} In the given schedule, what is the problem encountered duc to concurrent execution of transactions T1 and T2? Assuming the initial value X=5, what will be the value of X after the schedule is executed? (G3) P.E.O. Tl read (X) 2 X=X+10 3 Read (X) 4 X=X+20 5 Write (X) 6 ; Write (X) 7 Commit 8 (i) Consider the following relation StudentCoursc. (3) StudentCourse student1D | studentName | CGPA | courseID | courseNane | credits Which of the following commands result in an update anomaly? Justify your answer. (i) DELETE FROM StudentCourse WHERE studentID = 132 Gi) UPDATE StudentCourse SET credits = 3 WHERE courseID = 118 4095 7 @j) Consider the relation R = {A, B, C, D, E, F, G, H, 1, J} and the set of functional dependencies F ={{A, B} > {C}, {A} > {D, E}, {B} > 1Fh. {F} > {G,H}, {D} > {L Shr. (3) (i) Find the closure of {A, B}. (ii) Assuming {A, B} as the primary key, does the relation R exhibit partial dependency? Justify your answer. Section B 2. (a) Consider a relation R(A, B). Is the given relation in BCNF? Why or why not? (3) (b) Consider the following ER diagram and answer the questions that follow : (5) STUDENT PL0: 4095 8 (i) Specify the role names for the given relationship. (ii) Determine the cardinality ratio. Justify your answer. (iii) Determine the participation constraint. Justify your answer. (c) Consider the following relation for which {Car#, Salesperson} is the primary key. Assume that all attributes are simple and atomic. Also, assume that a car may be sold by multiple salespersons. CarSale(Car#, dateSold, Salespersoni#, Commission”, DiscountAmt) Additional functional dependencies are : {dateSold > DiscountAmt}, {Salesperson > Commission%} (+4) (i) Based on the given primary key, check whether the above schema is in 2NT. Justify your answer. (ii) If required, normalize the given relation up to 3NE. Show all the intermediate steps. 4095 9 (a) Consider the following relation schema : (4) Student(SSN, Name, Major, Birthdate) Course(Courseld, CourscName) Enroll(SSN, Courseld, Duration) Which of the relational model constraints may be violated by the following operations? Justify your answer in each case, (i) Insert a record in the Enroll table. (ii) Delete a record from the Student table. (b) Describe the three-schema architecture with the help of a suitable diagram. In this context, give a suitable example of data independence. (342) (c) State and prove the Pseudotransitive inference rule. (14342) Apply the above rule to infer ONE additional functional dependency for the given set F = {M > P, MY > P, YP > C} (a) Consider a relation R(A, B, C, D, E) with the following dependencies : (2) PTO: 4095 10 {AB > C, CD > E, DE > B} Is AB a candidate key of this relation? Justify your answer. (b) Consider the following SQL statement: (4) Create table Student (Rollno INT, Name VARCHAR(I5), Marks DECIMAL(3,2), Age INT CHECK(Age>=17 and Age <=25), DOB DATE); Which of the following values entered for the columns holds valid? Justify your answer for each case. (i) '14-12-2002' for DOB (ii) 34.75 for Marks (iii) 16 for Age (iv) '21' for RollNo 4095 (c) 5. (a) 11 Consider the following relation schema : (9) Student (sNum: integer, sName: string, major: string, level: string, age: integer) Class (cName: string, room: string, fID: integer) Enrolled (sNum: integer, cName: string) Write SQL statements to perform the following : (i) Find the names of all classes that either meet in room 'R12' or have five or more students enrolled. (ii) For all levels except 'JR', display the level and the average age of students for that level. (iii) Find the names of students not enrolled in any class. Consider the following relational schema : (3) retiredEmployee pmetD lempName pasicSalary HeptName payGradd 25000 35000 15000 Research 40000 Finance [DEF LOS jPranay [22000 Admin [POR 1106 _|Dheeraj [45000 |Research |POR [Lo7__Aarav [14000 |Finance [ABC P.T.O; 4095 12 Show the result for each of the following on the tables : (i) SELECT deptName, COUNT (*), SUM (basicSalary) FROM retiredEmployee GROUP BY deptName; (i) SELECT empID, empName, deptName FROM retiredEmployee WHERE empName LIKE '_a%'; (b) Consider the following ER diagram to conceptualize a database that can be uscd to keep track of transport ships and their locations. (6) (i) Map the given ER diagram into a relational schema. (i) Specify the primary key and foreign keys for each relation. 4095 13 _——__ dite’ lime stamp Time ‘SHIP_MOVEMENT| Laltede >> . i Type’) Cronnage)) name _ L_ SHR = SHIP_TYPE (vnery Pad (6) T1 P 2 R 10 a 5 25 [a 6 Show the results of the following operations : (i) p, (T1 X T2) Gi) Tl - T2 Gii) T1 4 T2 Pe. 4095 14 6. (a) Compare and contrast the traditional file processing approach with the database approach in the context of the self-describing nature of the database system 2) (b) Why can a database allow at most one primary index on a file but several secondary indexes? (3) (c) Consider a relation R with three attributes {A, B, C}. It is decomposed into relations R1 with attributes {A, B} and R2 with attributes {B, CG}. State the condition (using relational algebra notation) that should be met for this decomposition to satisfy lossless-join property. (4) (d) Considering the below given state of R(A, B, C, D) : (6) Which of these FDs may hold on R? Justify your answer. () DOA di) BC > D (iil) BC > A 4095 15 1. (a) How does multilevel indexing improve the efficiency of searching an index file? (3) (b) Suppose that we have an ordered file with r = 10,000 records stored on a disk. The records are of fixed size and are unspanned. The search key field in each record is V = 9 bytes long. The remaining attributes of the record are 91 bytes in total. The block size for the disk is B = 1024 bytes, Compute the following : (i) record length (R) (ii) blocking factor (bfr) (iii) number of file blocks (b) (iv) number of block accesses required during binary search on the data (4) (c) ABC shipping company prides itself on having up- to-date information on the processing and current location of each shipped item. To do this, the company relies on its database management system. Shipped items can be characterized by item number (unique), weight, dimensions, insurance P.T.0; 4095 16 amount, destination, and final delivery date. Shipped items are received into the system at a single retail center. Retail centers are characterized by their type, unique ID, and address. Shipped items arrive at their destination via onc or more standard transportation events (i.e., flights, truck deliveries). These transportation events are characterized by a unique schedule number, a type (e.g., flight, truck), and a deliveryRoute. Create an Entity Relationship diagram that captures this information about the company. Also, indicate the primary key, cardinality, and participation constraints. (8) (1500)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy