GUJARAT TECHNOLOGICAL UNIVERSITY

Similar documents
Northern India Engineering College, New Delhi Question Bank Database Management System. B. Tech. Mechanical & Automation Engineering V Semester

GUJARAT TECHNOLOGICAL UNIVERSITY

Sankalchand Patel College of Engineering, Visnagar B.E. Semester III (CE/IT) Database Management System Question Bank / Assignment

Normalization. Murali Mani. What and Why Normalization? To remove potential redundancy in design

Introduction to Databases

COSC Dr. Ramon Lawrence. Emp Relation

Database Systems CSE Comprehensive Exam Spring 2005

Relational Database Design (II)

VIEW OTHER QUESTION PAPERS

COSC 304 Introduction to Database Systems. Entity-Relationship Modeling

1/24/2012. Chapter 7 Outline. Chapter 7 Outline (cont d.) CS 440: Database Management Systems

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2009 Lecture 4 - Schema Normalization

CS425 Midterm Exam Summer C 2012

NJIT Department of Computer Science PhD Qualifying Exam on CS 631: DATA MANAGEMENT SYSTEMS DESIGN. Summer 2012

2011 DATABASE MANAGEMENT SYSTEM

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

CS3DB3/SE4DB3/SE6M03 TUTORIAL

CS403- Database Management Systems Solved MCQS From Midterm Papers. CS403- Database Management Systems MIDTERM EXAMINATION - Spring 2010

COMP Instructor: Dimitris Papadias WWW page:

Babu Banarasi Das National Institute of Technology and Management

The University of British Columbia

Intermediate SQL ( )

CS425 Fall 2016 Boris Glavic Chapter 2: Intro to Relational Model

Lecture3: Data Modeling Using the Entity-Relationship Model.

DATABASE MANAGEMENT SYSTEMS

Database Design Theory and Normalization. CS 377: Database Systems

Functional dependency theory

THE COPPERBELT UNIVERSITY

CS 582 Database Management Systems II

CS 348 Introduction to Database Management Assignment 2

LECTURE 3: ENTITY-RELATIONSHIP MODELING

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Fall 2009 Lecture 3 - Schema Normalization

Entity-Relationship Modelling. Entities Attributes Relationships Mapping Cardinality Keys Reduction of an E-R Diagram to Tables

Conceptual Database Design. COSC 304 Introduction to Database Systems. Entity-Relationship Modeling. Entity-Relationship Modeling

CS403- Database Management Systems Solved Objective Midterm Papers For Preparation of Midterm Exam

Task: Design an ER diagram for that problem. Specify key attributes of each entity type.

A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS

Conceptual Design. The Entity-Relationship (ER) Model

Database Management System (15ECSC208) UNIT I: Chapter 2: Relational Data Model and Relational Algebra

UNIT 3 DATABASE DESIGN

UNIVERSITI SAINS MALAYSIA. CIT503 Databases and E-Commerce Rapid Application Development. CSI512 Database Management Systems

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 7 Data Modeling with Entity Relationship Diagrams

Techno India Batanagar Computer Science and Engineering. Model Questions. Subject Name: Database Management System Subject Code: CS 601

CS348: INTRODUCTION TO DATABASE MANAGEMENT (Winter, 2011) FINAL EXAMINATION

Database Management Systems (Classroom Practice Booklet Solutions)

Practice questions recommended before the final examination

Applied Databases. Sebastian Maneth. Lecture 5 ER Model, Normal Forms. University of Edinburgh - January 30 th, 2017

MIDTERM EXAMINATION Spring 2010 CS403- Database Management Systems (Session - 4) Ref No: Time: 60 min Marks: 38

consider the following tables pertaining to employees working for different Write the SQL statement to retrieve the average age of employees for each

DATABASE MANAGEMENT SYSTEM

Schema And Draw The Dependency Diagram

B.C.A DATA BASE MANAGEMENT SYSTEM MODULE SPECIFICATION SHEET. Course Outline

Chapter 2 Introduction to Relational Models

Database Management

Examination paper for TDT4145 Data Modelling and Database Systems

1. Considering functional dependency, one in which removal from some attributes must affect dependency is called

ACS-2914 Normalization March 2009 NORMALIZATION 2. Ron McFadyen 1. Normalization 3. De-normalization 3

UNIVERSITY OF TORONTO MIDTERM TEST SUMMER 2017 CSC343H Introduction to Databases Instructor Tamanna Chhabra Duration 120 min No aids allowed

Database Systems ER Model. A.R. Hurson 323 CS Building

CSCB20. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2017

Data about data is database Select correct option: True False Partially True None of the Above

Objective. The goal is to review material covered in Chapters 1-5. Do the following questions from the book.

Revised Guidelines for B.A. Programme Semester II Paper: Database Management System (Meeting held on 15 th Jan 2015)

15CSL58: DATABASE MANAGEMENT LABORATORY

Example Examination. Allocated Time: 100 minutes Maximum Points: 250

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

CSE 562 Database Systems

Conceptual Data Models for Database Design

Relational Database design. Slides By: Shree Jaswal

CMSC 424 Database design Lecture 3: Entity-Relationship Model. Book: Chap. 1 and 6. Mihai Pop

EECS-3421a: Test #1 Design

Chapter 8: Relational Database Design

Relational Model. CS 377: Database Systems

CS430 Final March 14, 2005

BIRKBECK (University of London)

The University of Nottingham

3 February 2011 CSE-3421M Test #1 p. 1 of 14. CSE-3421M Test #1. Design

Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 10-2

CS 2451 Database Systems: Database and Schema Design

Chapter 10. Chapter Outline. Chapter Outline. Functional Dependencies and Normalization for Relational Databases

School of Computing and Information Technology. Examination Paper Autumn 2016

Lecture 11 - Chapter 8 Relational Database Design Part 1

II B.Sc(IT) [ BATCH] IV SEMESTER CORE: RELATIONAL DATABASE MANAGEMENT SYSTEM - 412A Multiple Choice Questions.

ER to Relational Model. Professor Jessica Lin

IS 263 Database Concepts

CSIT115/CSIT815 Data Management and Security Assignment 1 5 March 2018

begin [atomic] operation, operation, { commit rollback} end

Applied Databases. Sebastian Maneth. Lecture 5 ER Model, normal forms. University of Edinburgh - January 25 th, 2016

SYED AMMAL ENGINEERING COLLEGE

Lecture 5 STRUCTURED ANALYSIS. PB007 So(ware Engineering I Faculty of Informa:cs, Masaryk University Fall Bühnová, Sochor, Ráček

NOTE: DO NOT REMOVE THIS EXAM PAPER FROM THE EXAM VENUE

Entity-Relationship Model &

Bachelor in Information Technology (BIT) O Term-End Examination

Unit 3 : Relational Database Design

LAB 2 Notes. Conceptual Design ER. Logical DB Design (relational) Schema Refinement. Physical DD


Review The Big Picture

CT13 DATABASE MANAGEMENT SYSTEMS DEC 2015

Chapter 3: Introduction to SQL

Informal Design Guidelines for Relational Databases

Transcription:

Seat No.: Enrolment No. GUJARAT TECHNOLOGICAL UNIVERSITY BE - SEMESTER III (NEW) - EXAMINATION SUMMER 2017 Subject Code: 21303 Date: 02/06/2017 Subject Name: Database Management Systems Time: 10:30 AM to 01:00 PM Total Marks: 70 Instructions: 1. Attempt all questions. 2. Make suitable assumptions wherever necessary. 3. Figures to the right indicate full marks. Q.1 Short Questions 14 1 Write advantages of Database System. 2 The number of tuples in a relation is known as A. degree B. relation C. attribute D. cardinality 3 Give an example of a relation schema R and a set of dependencies such that R is in BCNF but is not in 4NF. 4 What is locking? Define each types of locking. 5 What will be the output of following SQL statement? select substr( 123456789,instr( abcabcabc, b ), 4) from dual; A. 6789 B. 2345 C. 56789 D. 456789 6 is an attribute, or set of attributes, that uniquely identifies a tuple within a relation A. Foreign key B. Superkey C. Matching key D. None of above 7 List out any three properties of MVD. 8 What is serialisability? what is its objective? 9 TO_CHAR function is used A. To convert any character literal to character datatype B. To convert ascii to character datatype C. To convert date and number datatype to character datatype D. Both (A) and (B) 10 Which of the following aspects of data is the concern of a relational database model? A. data manipulation B. data integrity C. data structure D. all of these 11 Considering functional dependency, one in which removal from some attributes must affect dependency is called A. full functional dependency B. partial dependency C. prime functional dependency D. transitive dependency 12 What is Index? List type of index and write syntax to create an index. 13 Define wait-die & wound-wait. 14 Define Constraint. List out constraints. 1

Q.2 (a) Define view. What are the types of view? Write syntax to create view of each 03 type. Give an example of view. (b) Define Transaction. List out properties of transaction. Explain two-phase commit protocol. In academic world, A researcher can either be employed as a professor or a lab assistant. There are three kinds of professors: Assistant, associate, and full professors. The following should be stored: For each researcher, his/her name, year of birth, and current position (if any). For each institution, its name, country, and inauguration year. For each institution, the names of its schools (e.g. School of Law, School of Business, School of Computer Science,... ). A school belongs to exactly one institution. An employment history, including information on all employments (start and end date, position, and what school). Information about co-authorships, i.e., which researchers have co-authored a research paper. The titles of common research papers should also be stored. For each researcher, information on his/her highest degree (BSc, MSc or PhD), including who was the main supervisor, and at what school. For each professor, information on what research projects (title, start date, and end date) he/she is involved in, and the total amount of grant money for which he/she was the main applicant. Draw an ER diagram for the data set described above. Make sure to indicate all cardinality constraints specified above. The ER diagram should not contain redundant entity sets, relationships, or attributes. Also, use relationships whenever appropriate. In college database, we have following: A college contains many departments Each department can offer any number of courses Many instructors can work in a department An instructor can work only in one department For each department there is a Head An instructor can be head of only one department Each instructor can take any number of courses A course can be taken by only one instructor A student can enroll for any number of courses Each course can have any number of students Draw an ER diagram for the data set described above. Make sure to indicate all cardinality constraints specified above. The ER diagram should not contain redundant entity sets, relationships, or attributes. Also, use relationships whenever appropriate. (II) A weak entity set can always be made into a strong entity set by adding to its attributes the primary-key attributes of its identifying entity set. Outline what sort of redundancy will result if we do so. Q.3 (a) In Estimating Statistics of Expression Results, Explain Selection Size 03 2

(b) Estimation. Consider the following relational database, where the primary keys are underlined. Give an expression in the relational algebra to express each of the following queries: employee (ssn, name, dno, salary, hobby, gender) department (dno, dname, budget, location, mgrssn) works_on (ssn, pno) project (pno, pname, budget, location, goal) 1. List all pairs of employee names and the project numbers they work on. 2. List out department number, department name and department budget. 3. List all projects that Raj Yadav works on by project name. 4. List the names of employees who supervise themselves. Compute the closure of the following set F of functional dependencies for relation schema r ( A, B, C, D, E). A BC CD E B D E A List the candidate keys for R. (II) Write a PL/SQL block using explicit cursor that will display the customer name, the fixed deposit number and the fixed deposit amount of the first 5 customers holding the highest amount in fixed deposits. Use following database: cust_mstr ( custno, name, occupation) fd_dtls ( fd_ser_no, fd_no, type, period, opndt, duedt, amt, dueamt) acct_fd_cust_dtls ( acct_fd_no, custno) Q.3 (a) Explain Heuristics in Optimization. 03 (b) Consider the following relational database, where the primary keys are underlined. Give an expression in the relational algebra to express each of the following queries: course (course-id, title, dept_name, credits) instructor (id, name, dept_name, salary) section (course-id, sec-id, semester, year, building, room_no, time_slot_id) teaches (id, course-id, sec-id, semester, year) 1. Find the name of all instructors in the physics department. 2. Find all the courses taught in the fall 2009 semester but not in Spring semester. 3. Find the names of all instructors in the Comp. Sci. department together with the course titles of all the courses that the instructors teach. 4. Find the average salary in each department. In the BCNF decomposition algorithm, suppose you use a functional dependency α β to decompose a relation schema r ( α, β, γ ) into r1(α, β ) and r2( α, γ ). 1. What primary and foreign-key constraint do you expect to hold on the decomposed relations? 2. Give an example of an inconsistency that can arise due to an erroneous update, if the foreign-key constraint were not enforced on the decomposed relations above. 3. When a relation is decomposed into 3NF, what primary and foreign key dependencies would you expect will hold on the decomposed 3

schema? (II) A stored function is created to perform the acct_no check operation. f_chkacctno() is the name of function which accepts a variable acct_no from the user and returns value 0 if acct_no does not exist or 1 if acct_no exists. Write a PL/SQL block that performs transaction(i.e., deposit/withdrawal) on account. If account exists, change balance depending on the transaction amount to be deposited or withdrawal. Assume account table with fields account number, name, type and balance. Q.4 (a) What is difference between authorization and authentication? Explain the use of audit trail. (b) A college maintains details of its lecturers' subject area skills. These details comprise: Lecturer Number, Lecturer Name, Lecturer Grade, Department Code, Department Name, Subject Code, Subject Name, Subject Level 03 Assume that each lecturer may teach many subjects but may not belong to more than one department. Subject Code, Subject Name and Subject Level are repeating fields. Normalise this data to Third Normal Form. Consider the following employee database, primary keys are underlined : 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 for each of the following queries: 1. Find the names of all employees who work for First Bank Corporation. 2. Give all employees of First Bank Corporation a 10-percent raise. 3. Find the names and cities of residence of all employees who work for First Bank Corporation. 4. Find the names, street addresses, and cities of residence of all employees who work for First Bank Corporation and earn more than $10,000. 5. Find all employees in the database who live in the same cities as the companies for which they work. 6. Find all employees in the database who do not work for First Bank Corporation. 7. Find the company and number of employees in company that has more than 30 employees. Q.4 (a) Write & explain two rules in the Bell-LaPadula model for mandatory access control. (b) A software contract and consultancy firm maintains details of all the various projects in which its employees are currently involved. These details comprise: Employee Number, Employee Name, Date of Birth, Department Code, Department Name, Project Code, Project Description, Project Supervisor 03 Assume the following: Each employee number is unique. Each department has a single department code. Each project has a single code and supervisor. Each employee may work on one or more projects. Employee names need not necessarily be unique. Project Code, Project Description and Project Supervisor are repeating fields. 4

Normalise this data to Third Normal Form. Consider the following Hotel database, primary keys are underlined : hotel (hotel-no, name, address) room (room-no, hotel-no, type, price) booking (hotel-no, guest-no, date-from, date-to, room-no) guest (guest-no, name, address) Give an expression in SQL for each of the following queries: 1. List the names and addresses of all guests in London, alphabetically ordered by name. 2. List out hotel name and total number of rooms available. 3. List the details of all rooms at the Grosvenor Hotel, including the name of the guest staying in the room, if the room is occupied. 4. List all guests currently staying at the Grosvenor Hotel. 5. List the rooms that are currently unoccupied at the Grosvenor Hotel. 6. List the number of rooms in each hotel in London. 7. List out all guests who have booked room for three or more days. Q.5 (a) Explain database system architecture levels. 03 (b) What is materialized view? Explain Query optimization with materialized view. Explain three concurrency problem. How does the strict two-phase locking protocol solve three problems of concurrency? explain with example. Q.5 (a) Explain tasks of DBA. 03 (b) Explain Query Processing steps. Explain two phase locking protocol in detail. ************* 5