Você está na página 1de 6

B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2011.

Fourth Semester Computer Science and Engineering CS 2255 DATABASE MANAGEMENT SYSTEMS (Common to Information Technology) (Regulation 2008) Time : Three hours Maximum : 100 marks Answer ALL questions. PART A (10 2 = 20 marks) 1. What is a data model? 2. With an example explain what a derived attribute is? 3. Consider the following relation : EMP (ENO, NAME, DATE_OF_BIRTH, SEX, DATE_OF_JOINING, BASIC_PAY, DEPT) Develop an SQL query that will find and display the average BASIC_PAY in each DEPT. 4. List the two types of embedded SQL SELECT statements. 5. Consider the following relation : R (A, B, C, D, E) The primary key of the relation is AB. The following functional dependencies hold : A C B D AB E Is the above relation in second normal form? 6. Consider the following relation : R(A, B, C, D) The primary key of the relation is A. The following functional dependencies hold : A B,C B D Is the above relation in third normal form? 7. List the two commonly used Concurrency Control techniques. 8. List the SQL statements used for transaction control. 9. What are ordered indices? 10. Distinguish between sparse index and dense index. PART B (5 16 = 80 marks) 11. (a) (i) Construct an E-R diagram for a car-insurance company whose customers own one or more cars each. Each car has associated with it zero to any number of recorded accidents. State any assumptions you make. (6) (ii) A university registrars office maintains data about the following entities : (1) Courses, including number, title, credits, syllabus, and prerequisites; (2) Course offerings, including course number, year, semester, section number, instructor, timings, and classroom; (3) Students, including student-id, name, and program; and (4) 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 E-R diagram for the registrars office. Document all assumptions that you make about the mapping constraints. (10) Or (b) (i) With a neat sketch discuss the three-schema architecture of a DBMS. (8) (ii) What is aggregation in an ER model? Develop an ER diagram using aggregation that captures the following information : Employees work for projects. An employee working for a particular project uses various machinery. Assume necessary attributes. State any assumptions you make. Also discuss about the ER diagram you have designed. (2 + 6) 12. (a) (i) Explain the distinctions among the terms primary key, candidate key, and super key. Give relevant examples. (6) (ii) What is referential integrity? Give relevant example. (4) (iii) Consider the following six relations for an Order-processing Database Application in a Company : CUSTOMER (CUSTNO, CNAME, CITY) ORDER (ORDERNO, ODATE, CUSTNO, ORD_AMT) ORDER_ITEM (ORDERNO, ITEMNO, QTY) ITEM (ITEMNO, ITEM_NAME, UNIT_PRICE) SHIPMENT (ORDERNO, ITEMNO, WAREHOUSENO, SHIP_DATE) WAREHOUSE (WAREHOUSENO, CITY) Here, ORD_AMT refers to total amount of an order; ODATE is the date the order was placed; SHIP_DATE is the date an order is shipped from the warehouse. Assume that an order can be shipped from several warehouses. Specify the foreign keys for this schema, stating any assumptions you make. (6) Or (b) With relevant examples discuss the various operations in Relational Algebra. (16) 13. (a) Define a functional dependency. List and discuss the six inference rules for functional dependencies. Give relevant examples. (16) Or (b) (i) Give a set of Functional dependencies for the relation schema R(A,B,C,D,E) with primary key AB under which R is in 2NF but not in 3NF. (5) (ii) Prove that any relation schema with two attributes is in BCNF.(5) (iii) Consider a relation R that has three attributes ABC. It is decomposed into relations R1 with attributes AB and R2 with attributes BC. State the definition of lossless-join decomposition with respect to this example. Answer this question concisely by writing a relational algebra equation involving R, R1, and R2. (6) 14. (a) (i) Define a transaction. Then discuss the following with relevant examples : (8) (1) A read only transaction (2) A read write transaction (3) An aborted transaction (ii) With a neat sketch discuss the states a transaction can be in. (4)

(iii) Explain the distinction between the terms serial schedule and serializable schedule. Give relevant example. (4) Or (b) (i) Discuss the ACID properties of a transaction. Give relevant example. (8) (ii) Discuss two phase locking protocol. Give relevant example. (8) 15. (a) (i) When is it preferable to use a dense index rather than a sparse index? Explain your answer. (4) (ii) Since indices speed query processing, why might they not be kept on several search keys? List as many reasons as possible.(6) (iii) Explain the distinction between closed and open hashing. Discuss the relative merits of each technique in database applications. (6) Or (b) Diagrammatically illustrate and discuss the steps involved in processing a query.(16) B.E./B.Tech. DEGREE EXAMINATION, APRIL/MAY 2011 Fourth Semester Computer Science and Engineering CS 2255 DATABASE MANAGEMENT SYSTEMS (Common to Information Technology) (Regulation 2008) Time : Three hours Maximum : 100 marks Answer ALL questions PART A (10 2 = 20 marks) 1. Who is a DBA? What are the responsibilities of a DBA? 2. What is a data model? List the types of data models used. 3. What is embedded SQL? What are its advantages? 4. What is the difference between tuple relational calculus and domain relational calculus? 5. What is meant by lossless-join decomposition? 6. A relation { } D C B A R , , , = has FDs { } A D D C C AB F = , , . Is R is in 3NF? 7. What are the ACID properties? 8. What are two pitfalls (problems) of lock-based protocols? 9. What are the advantages and disadvantages of indexed sequential file? 10. What is database tuning? PART B (5 16 = 80 marks) 11. (a) (i) With a neat diagram, explain the structure of a DBMS. (9) (ii) Draw an E-R diagram for a small marketing company database, assuming your own data requirements. (7) Or (b) (i) Compare the features of file system with database system. (8) (ii) Explain the differences between physical level, conceptual level and view level of data abstraction. (4) (iii) Mention any four major responsibilities of DBA. (4)

12. (a) (i) Consider the following relational database employee (employee-name, street, city) works ( employee-name, company-name, salary) company (company-name, city) manages (employee-name, manager-name) Give an expression in SQL to express each of the following queries : Find the names and cities of residence of all employees who work for XYZ Bank. Find the names, street address, and cities of residence of all employees who work for XYZ Bank and earn more than Rs. 10,000 per annum. Find the names of all employees in this database who live in the same city as the company for which they work. Find the names of all employees who live in the same city and on the same street as do their managers. (4 3 = 12) (ii) Define the term distributed database management system and mention the issues to be considered in the design of the same. (4) Or (b) (i) What are the relational algebra operations supported in SQL? Write the SQL statement for each operation. (12) (ii) What is data integrity? Explain the types of integrity constraints. (4) 13. (a) (i) Explain 1NF, 2NF, 3NF and BCNF with suitable example. (8) (ii) Consider the universal relation { } I H G F E D C B A R , , , , , , , , = and the set of functional dependencies ( ) { } { } { } { } { } F B E D A C B A F = , , , , { , { } { } { } { }} , , , J I D H G F . What is the key for R? Decompose R into 2NF, then 3NF relations. (8) Or (b) What are the pitfalls in relational database design? With a suitable example, explain the role of functional dependency in the process of normalization. (16) 14. (a) (i) Explain about immediate update and deferred update recovery techniques. (8) (ii) Explain the concepts of serializability. (8) Or (b) (i) Explain Two-phase locking protocol. (8) (ii) Describe about the deadlock prevention schemes. (8) 15. (a) (i) List the different levels in RAID technology and explain its features. (12)

(ii) Describe the different methods of implementing variable length records. (4) Or (b) (i) Explain the various indexing schemes used in database environment. (12) (ii) Let relations ( ) C B A r , , 1 and ( ) E D C r , , 2 have the following properties : 1 r has 20,000 tuples, r2 has 45,000 tuples, 25 tuples of r1 fit on one block, and 30 tuples of r2 fit on one block. Estimate the number of block accesses required, using each of the following join strategies for r1 r2 : (4) (1) Nested-loop join with r1 as outer relation (2) Block nested-loop join with r1 as outer relation (3) Merge join if r1 and r2 are initially sorted (4) Hash join (assuming that no overflow occurs).

B.E./B.Tech. DEGREE EXAMINATION, APRIL/MAY 2010 Fourth Semester Computer Science and Engineering CS2255 DATABASE MANAGEMENT SYSTEMS (Common to Information Technology) (Regulation 2008) Time: Three hours Maximum: 100 Marks Answer ALL Questions PART A (10 2 = 20 Marks) 1. Explain the basic structure of a relational database with an example. 2. What are the functions of a DBA? 3. Give the usage of the rename operation with an example. 4. What do you mean by weak entity set? 5. What is normalization? 6. Write a note on functional dependencies. 7. What do you mean by a transaction? 8. Define the term ACID properties. 9. Describe flash memory. 10. List out the physical storage media. PART B (5 16 = 80 Marks) 11. (a) (i) Discuss the various disadvantages in the file system and explain how it can be overcome by the database system. (6) (ii) What are the different Data models present? Explain in detail. (10) Or (b) (i) Explain the Database system structure with a neat diagram. (10)

(ii) Construct an ER diagram for an employee payroll system. (6) 12. (a) (i) Explain the use of trigger with your own example. (8) (ii) Discuss the terms Distributed databases and client/server databases. (8) Or (b) (i) What is a view? How can it be created? Explain with an example. (7) (ii) Discuss in detail the operators SELECT, PROJECT, UNION with suitable examples. (9) 13. (a) Explain 1NF, 2NF and 3NF with an example. (16) Or (b) Explain the Boyce-Codd normal form with an example. Also state how it differs from that of 3NF. (16) 14. (a) (i) How can you implement atomicity in transactions? Explain. (8) (ii) Describe the concept of serilalizability with suitable example. (8) Or (b) How concurrency is performed? Explain the protocol that is used to maintain the concurrency concept. (16) 15. (a) What is RAID? Explain it in detail. (16) Or (b) Mention the purpose of indexing. How this can be done by B+ tree? Explain. (16)