Department of Computer Science & Engineering

13 downloads 171 Views 64KB Size Report
Edition, Tata McGraw Hill, 2006 (Unit I and Unit-V). 2. C.J.Date, A.Kannan, S. Swamynathan, “An Introduction to Database Systems”, Eighth Edition,. Pearson ...
RAJALAKSHMI ENGINEERING COLLEGE Rajalakshmi Nagar, Thandalam, Chennai – 602 105

Department of Computer Science & Engineering

CS2255 - Database Management Systems

Part – B - Question Bank (Ver. 1.0) Prepared by

T.PRABA Lecturer / CSE

CS 2255 DATABASE MANAGEMENT SYSTEMS (Common to CSE & IT) L T 3 0

P 0

C 3

1. INTRODUCTION 9 Purpose of Database System – Views of data – Data Models – Database Languages – Database System Architecture – Database users and Administrator – Entity–Relationship model (E-R model ) – E-R Diagrams -- Introduction to relational databases 2. RELATIONAL MODEL 9 The relational Model – The catalog – Types – Keys - Relational Algebra – Domain Relational Calculus – Tuple Relational Calculus - Fundamental operations – Additional Operations- SQL fundamentals - Integrity – Triggers - Security – Advanced SQL features – Embedded SQL – Dynamic SQL - Missing Information – Views – Introduction to Distributed Databases and Client/Server Databases 3. DATABASE DESIGN 9 Functional Dependencies – Non-loss Decomposition – Functional Dependencies – First, Second, Third Normal Forms, Dependency Preservation – Boyce/Codd Normal Form- Multi-valued Dependencies and Fourth Normal Form – Join Dependencies and Fifth Normal Form 4. TRANSACTIONS 9 Transaction Concepts - Transaction Recovery – ACID Properties – System Recovery – Media Recovery – Two Phase Commit – Save Points – SQL Facilities for recovery – Concurrency – Need for Concurrency – Locking Protocols – Two Phase Locking – Intent Locking – Deadlock – Serializability – Recovery Isolation Levels – SQL Facilities for Concurrency. 5. IMPLEMENTATION TECHNIQUES 9 Overview of Physical Storage Media – Magnetic Disks – RAID – Tertiary storage – File Organization – Organization of Records in Files – Indexing and Hashing – Ordered Indices – B+ tree Index Files – B tree Index Files – Static Hashing – Dynamic Hashing – Query Processing Overview – Catalog Information for Cost Estimation – Selection Operation – Sorting – Join Operation – Database Tuning. TOTAL = 45 TEXT BOOKS: 1. Abraham Silberschatz, Henry F. Korth, S. Sudharshan, “Database System Concepts”, Fifth Edition, Tata McGraw Hill, 2006 (Unit I and Unit-V). 2. C.J.Date, A.Kannan, S.Swamynathan, “An Introduction to Database Systems”, Eighth Edition, Pearson Education, 2006.( Unit II, III and IV) REFERENCES: 1. Ramez Elmasri, Shamkant B. Navathe, “Fundamentals of Database Systems”, FourthEdition , Pearson / Addision wesley, 2007. 2. Raghu Ramakrishnan, “Database Management Systems”, Third Edition, McGraw Hill, 2003. 3. S.K.Singh, “Database Systems Concepts, Design and Applications”, First Edition, Pearson Education, 2006.

Unit – I INTRODUCTION

Part – B

1. Discuss the various disadvantages in the file system and explain how it can be overcome by the database system. (6) 2. What are the different Data models present? Explain in detail. (10) 3. Explain the Database system structure with a neat diagram. (10) (or) Explain the system structure of a database system with neat diagram. (16) 4. Construct an ER diagram for an employee payroll system. (6) 5. Explain the three different groups of data models with examples. (16) 6. Describe the components of entity-relationship diagram with suitable examples. (16) 7. Describe the system structure of a database system. (12) 8. List out the functions of a DBA. (4) (or) Explain the role and functions of the database administrator. (6) 9. Illustrate the issues to be considered while developing an ER-diagram. (8) 10. Compare file system with database system. (8) 11. Explain the architecture of DBMS. (8) (or) Explain the architecture of DBMS with suitable block diagram. (8) 12. Construct an ER-diagram for hospital with a set of patients and a set of medical doctors. Associate with each patient a log of the various tests and examinations conducted. 13. Construct an ER diagram for a car insurance company that has a set of customers, each of whom owns one/more cars. Each car has associated with it zero or any number of recorded accidents. (8) 14. Construct appropriate tables for the above ER diagram. (8) 15. Define data model. Explain the different types of data models with relevant examples. (10) 16. Explain the component modules of a DBMS and their interactions with the architecture. (10) 17. Construct an ER diagram to a model online book store. (6)

18. Develop an Entity Relationship model for a Library Management System. Clearly state the Problem Definition, Description, Business Rules and any assumptions you make. (16) 19. Discuss the various design issues involved in ER database schema. (16) 20. Develop the ER model for the “Company” schema. Explain the procedure involved and show the final ER diagram. Include entities like employee, department, project etc. You can add more relevant entities when needed. Design and justify the attributes, relationships and cardinality required for the domain. (16)

Unit – II RELATIONAL MODEL

Part - B

1. Explain the use of trigger with your own example. (8) 2. Discuss the terms Distributed databases and client/server databases. (8) 3. What is a view? How can it be created? Explain with an example. (7) 4. Discuss in detail the operators SELECT, PROJECT, UNION with suitable examples. (9) 5. Describe the features of Embedded SQL and Dynamic SQL. Give suitable examples. (16) 6. Write short notes on the following: i. Mandatory access control (9) ii. Missing information (7) 7. Consider the relational database employee (empname, street, city) works (empname, companyname, salary) company (companyname, city) manages (empname, managername) Give an expression in the relational algebra for each request: 1. Find the names of all employees who work for First Bank Corporation. 2. Find the names, street, addresses, and cities of residence of all employees who work for First Bank Corporation and earn more than 200000 per annum. 3. Find the names of all employees in this database who live in the same city as the company for which they work. 4. Find the names of all the employees who earn more than every employees of Small Bank Corporation. (4 x 2 = 8) 8. Discuss about triggers. How do triggers offers a powerful mechanism for dealing with the changes to a database with suitable example. (10) 9. What are nested queries? Explain with example. (6)

10. What are the relational algebra operations supported in SQL? Write the SQL statement for each operation. (8) (or) Explain the basic Relational Algebra operations with the symbol used and an example for each. (10) 11. Discuss on various relational algebra operators with suitable example. (8) 12. Discuss the strength and weakness of the trigger mechanism. Compare triggers with other integrity constraints supported by SQL. (8) 13. With relevant examples discuss the following in SQL. i. Data Definition Language (4) ii. Data Manipulation Language (4) iii. Data Control Language (4) iv. Views (4) 14. Discuss about Tuple Relational Calculus and Domain Relational Calculus. (6) 15. With short notes on the following (10) Data Manipulation Language (DML) Data Definition Language (DDL) Transaction Control Statements (TCS) Data Control Language (DCL) Data Administration Statement (DAS) 16. Consider the database given by the following schemas: (6) Customer (Cust_No, Sales_Person_No, City) Sales_Person (Sales_Person_No, Sales_Person_Name, Common_Prec, Year_of_Hire) Give an expression in SQL for each of the following queries: Display the list of all customers by Cust_No with the city in which each is located. List the names of the sales persons who have accounts in Delhi. 17. Consider the following relationship for a Company Database Application: Emlpoyee (Eno, Name, Sex, Dob, Doj, Designation, Basic_Pay, Dept_No) Department (Dept_No, Name) Project (Proj_No, Name, Dept_No) Worksfor(Eno, Proj_No, Date, Hours)

The attributes for each relation is self-explanatory. However the business rules are stated as follows. A department can control any number of projects. But only one department can control a project. An employee can work on any number of projects on a day. However an employee cannot work more than once on a project he / she worked on that day. The primary keys are underlined. i. Identify the foreign keys. Develop DDL to implement the above schema. (6) ii. Develop an SQL query to list the department number and the number of employees in each department. (2) iii. Develop a View that will keep track of the department number and the number of employees in each department. (4) iv. Develop an SQL query to list the details of employees who have worked in more than three projects on a day. (4) 18. For the following employee database sales (dept, item, volume) item (iname, type, color) dept (dname, floor) employee (eno, ename, manager_no, dept, salary, job_status) Write the SQL statement for the following queries i. Find the items sold by no department in second floor. (4) ii. Find the names of all the departments where all the employees earn less than their manager. (4) iii. Define the view to list the name and salary of Aarthi’s manager. (4) iv. Is the view is updatable? If no, state why? (4) 19. Consider the conceptual data model of a personnel system of a factory given below: Employee (Employee_Code, Employee_Name, Designation, Department) Skill (Employee_Code, Training_Code, Percent_Skill) Training (Training_Code, Name _of_Training, Period, Fees, Trainer’s_Code) Trainers (Trainers’s_Code, Name_of_Trainer, Address)

Write SQL queries for the following. i. To display all fields from TRAINING in an ordered manner on Trainer’s code. (4) ii. Create a view consisting of fields (Training_Code, Name_of_Training, Period) from TRAINING when Fees is less than or equal to 20,000. (4) iii. To group the records in SKILL relation based on Training_Code and then display the fields: Employee_Code, Training_Code and Percent_Skill. (4) iv. Update the Percent_Skill with 70% for employee_Code “E290” and Training_Code “T02” in SKILL. (4) 20. Briefly explain SQL built-in aggregate functions. (8)