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

Similar documents
COMP7640 Assignment 2

Database Management Systems Paper Solution

VIEW OTHER QUESTION PAPERS

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

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

GUJARAT TECHNOLOGICAL UNIVERSITY

Solutions to Final Examination

Examination paper for TDT4145 Data Modelling and Database Systems

Section 1: Redundancy Anomalies [10 points]

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

Informal Design Guidelines for Relational Databases

QUIZ 1 REVIEW SESSION DATABASE MANAGEMENT SYSTEMS

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

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF CSE COURSE PLAN

Functional Dependencies and Finding a Minimal Cover

DATABASE MANAGEMENT SYSTEMS

CS40 Exam #2 November 13, 2002

Database Systems Management

Chapter 10. Normalization. Chapter Outline. Chapter Outline(contd.)

Babu Banarasi Das National Institute of Technology and Management

1 (10) 2 (8) 3 (12) 4 (14) 5 (6) Total (50)

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

15CS53: DATABASE MANAGEMENT SYSTEM

M S Ramaiah Institute of Technology Department of Computer Science And Engineering

Total No. of Questions :09] [Total No. of Pages : 02. II/IV B.Tech. DEGREE EXAMINATIONS, NOV/DEC Second Semester CSE/IT DBMS

Database System Concepts and Architecture

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

Unit 2. Unit 3. Unit 4


CS 440 Assignment #1 Solutions

CS425 Midterm Exam Summer C 2012

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

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

Review The Big Picture

CSCI 585 Database Systems Prof. Dennis McLeod. Sample Midterm Exam

CSE 444, Winter 2011, Midterm Examination 9 February 2011

Introduction to Databases Exam

Queen s University Faculty of Arts and Science School of Computing CISC 432* / 836* Advanced Database Systems

MaanavaN.Com DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING QUESTION BANK

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

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

SYED AMMAL ENGINEERING COLLEGE

CS2255 DATABASE MANAGEMENT SYSTEMS QUESTION BANK UNIT I

Homework #4 1. Suppose that each of the following Update operations is applied directly to the database state shown in Figure 5.6.

Relational Database design. Slides By: Shree Jaswal

Chapter 14. Database Design Theory: Introduction to Normalization Using Functional and Multivalued Dependencies

A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS

CS317 File and Database Systems

INSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados

Schema And Draw The Dependency Diagram

Jordan University of Science & Technology Computer Science Department CS 728: Advanced Database Systems Midterm Exam First 2009/2010

This lecture. Databases -Normalization I. Repeating Data. Redundancy. This lecture introduces normal forms, decomposition and normalization.

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

Relational Database Design (II)

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

IMPORTANT: Circle the last two letters of your class account:

CS 348 Introduction to Database Management Assignment 2

Database Design Theory and Normalization. CS 377: Database Systems

UNIT 3 DATABASE DESIGN

Midterm 2: CS186, Spring 2015

CSE 562 Database Systems

Chapter 8: Relational Database Design

L Information Systems for Engineers. Final exam. ETH Zurich, Autumn Semester 2017 Friday

CS6302- DATABASE MANAGEMENT SYSTEMS- QUESTION BANK- II YEAR CSE- III SEM UNIT I

Database Management Systems MIT Introduction By S. Sabraz Nawaz

CS40 Exam #2 November 14, 2001

Functional Dependencies CS 1270

INSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados

Functional Dependencies and. Databases. 1 Informal Design Guidelines for Relational Databases. 4 General Normal Form Definitions (For Multiple Keys)

Sample Exam for CSE 480 (2017) KEY

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF CSE COURSE PLAN

Databases -Normalization I. (GF Royle, N Spadaccini ) Databases - Normalization I 1 / 24

CMSC 461 Final Exam Study Guide

Intermediate SQL ( )

CS 4604: Introduction to Database Management Systems. B. Aditya Prakash Lecture #5: Entity/Relational Models---Part 1

Score. 1 (10) 2 (10) 3 (8) 4 (13) 5 (9) Total (50)

City University of Hong Kong Course Syllabus. offered by Department of Computer Science with effect from Semester A 2017/18

Computer Science 597A Fall 2008 First Take-home Exam Out: 4:20PM Monday November 10, 2008 Due: 3:00PM SHARP Wednesday, November 12, 2008

Normalization. VI. Normalization of Database Tables. Need for Normalization. Normalization Process. Review of Functional Dependence Concepts

We shall represent a relation as a table with columns and rows. Each column of the table has a name, or attribute. Each row is called a tuple.

CSE344 Final Exam Winter 2017

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2008 Quiz I

Question 1. Relational Data Model and Relational Algebra [26 marks] Question 2. SQL and [26 marks]

CSE 444 Midterm Exam

ER to Relational Model. Professor Jessica Lin

Functional Dependency: Design and Implementation of a Minimal Cover Algorithm

Unit 3 : Relational Database Design

CS 582 Database Management Systems II

CS/B.Tech/CSE/New/SEM-6/CS-601/2013 DATABASE MANAGEMENENT SYSTEM. Time Allotted : 3 Hours Full Marks : 70

Bsc(Hons) Web Technologies. Examinations for / Semester 2

Schema Refinement and Normal Forms

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

Attach extra pages as needed. Write your name and ID on any extra page that you attach. Please, write neatly.

CS40 Exam #1 October 17, 2001

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

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

To overcome these anomalies we need to normalize the data. In the next section we will discuss about normalization.

Unit- III (Functional dependencies and Normalization, Relational Data Model and Relational Algebra)

IMPORTANT: Circle the last two letters of your class account:

18. Relational Database Design

Transcription:

JIT Department of Computer Science PhD Qualifying Exam on CS 63: DATA MAAGEMET SYSTEMS DESIG Summer 202 o book or other document is allowed. Duration of the exam: 2.5 hours. The total number of points is 00.

QUESTIO [8 points] Map the following ER schema into a relational schema. A B C D E F ET4 M R ET3 P O M L K G ET5 R3 ET R2 ET2 H J I Specify: (a) relation schemas, (b) primary keys, (c) foreign keys. QUESTIO 2 [6 points] Consider the following relational schema of a University database. PREREQUISITE Prerequisite_umber COURSE Cours_ame Credit_Hours Department SECTIO Section_Identifier Semester Year Instructor GRADE_REPORT Student_umber Section_Identifier Grade STUDET ame Student_umber Class Major Primary key attributes are underlined. Thus, Student_umber and Section_Identifier together form the primary key for GRADE_REPORT. Foreign keys are shown with arrows. For instance, SECTIO. is a foreign key that refers to the primary key COURSE.. 2

Write the following queries in Relational Algebra:. Retrieve the student identifiers, names and majors of all students who do not have any grade of A in any of their courses. 2. Find the names of all the students who have taken a Computer Science course (Department = CS) and an Information Systems course (Department = IS ). 3. Find the names of all the students who have taken two distinct course sections (you are not allowed to use the grouping and aggregation operator). 4. Find the names of the students who have taken exactly (no more and no less) the course sections the students named Smith have taken. QUESTIO 3 [28 points] Consider the database schema of Question 2. Write the following queries in SQL.. Retrieve the student identifiers, names and majors of all straight A students (students who have a grade of A in all their courses). 2. Retrieve the student identifiers, names and majors of all students who do not have any grade of A in any of their courses. 3. For each section taught by Professor Smith after 2005, retrieve the section identifier, the course name, semester, year, and the average grade in this section but only for sections with less than 20 students. 4. For every section that has more than 20 Computer Science students (Major = CS ) find the section identifier, course number and total number of students it has. 5. Find the Student_umber and ame of all the students who got the same number of As in their courses as the student with Student_umber 234578 got. 6. Find the names of all the students who have not taken any of the course sections the student(s) named Smith have taken. 7. Find the names of the students who have taken exactly (no more and no less) the course sections the students named Smith have taken. QUESTIO 4 [8 points] Write SQL to enforce the following constraints. If a constraint cannot be expressed in SQL explain why.. o course can have more than three prerequisite courses. 2. The number of distinct Computer Science courses (Department = CS ) a Computer Science student (Major = CS ) can take should be at least twice as many as the number of Information Systems courses (Department = IS ). 3

QUESTIO 5 [30 points] (Please justify your answers. Answers without justification will not get any points!). Consider the relation EGS (EMPLOYEE, GRADE, SALARY) with the functional dependencies: E G, G S (a) Show that E S holds. (b) Explain why the relation is not in BCF. (c) Consider three decompositions of EGS into (i) EG (EMPLOYEE, GRADE) and GS (GRADE, SALARY) (ii) ES (EMPLOYEE, SALARY) and EG (EMPLOYEE, GRADE) (iii) ES (EMPLOYEE, SALARY) and GS (GRADE, SALARY) For each of the three decompositions listed above, answer the following three questions. You have to prove your answers. Is the decomposition lossless join decomposition? Are the resulting small relations in BCF? Are dependencies preserved? 2. Prove or disprove the following inference rules for functional dependencies. A proof can be made either by a proof argument or by using Armstrong s inference rules including reflexive rule, augmentation rule and transitive rule. A disproof should be performed by demonstrating a relation instance that satisfies the conditions and functional dependencies in the left-hand side of the inference rule but does not satisfy the dependencies in the right-hand side. a. {X Y, Y Z} = {XY Z} b. {XY Z, X Z} = {Y Z} c. {X YZ, Z WY} = {X YZW} d. {X YW} = {Y X} e. {XY Z} = {X Z} 4

QUESTIO 6 [0 points] (Please justify your answers. Answers without justification will not get any points!). Consider the schedules S given below: S : r (X); r 2 (Z); r 3 (X); r (U); r 2 (V); r 3 (Y); w (X); w 2 (Z); w 3 (U); w 2 (Y) Draw the serializability (precedence) graph for S, and state whether the schedule is serializable or not. If it is serializable, write down the equivalent serial schedule. 2. Suppose you are told that no two transactions in a set of transactions will deadlock if they are the only transactions running concurrently using two phase locking. For example, T: w(x) w(y) and T2: w(y) w(z) will never deadlock together. Call such a set pairwise deadlock-free. Consider a pairwise deadlock-free set having at least three transactions. Can such a set encounter deadlock when it executes? Either prove that the set can t encounter deadlock or show by example that it can. 5