CSCE 4523 Introduction to Database Management Systems Final Exam Fall I have neither given, nor received,unauthorized assistance on this exam.

Similar documents
CSCE 4523 Introduction to Database Management Systems Final Exam Spring I have neither given, nor received,unauthorized assistance on this exam.

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

Database Management Systems Paper Solution

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

DATABASE MANAGEMENT SYSTEMS

Chapter 7 (Cont.) Transaction Management and Concurrency Control

CMSC 461 Final Exam Study Guide

Administration Naive DBMS CMPT 454 Topics. John Edgar 2

CS Final Exam Review Suggestions

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 13 Managing Transactions and Concurrency

CPSC 310: Database Systems / CSPC 603: Database Systems and Applications Final Exam Fall 2005

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

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

Chapter 22. Transaction Management

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

CSE 530A ACID. Washington University Fall 2013

Rajiv GandhiCollegeof Engineering& Technology, Kirumampakkam.Page 1 of 10

A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS

Transactions. ACID Properties of Transactions. Atomicity - all or nothing property - Fully performed or not at all

Database Management Systems Written Examination

CSE 444, Winter 2011, Midterm Examination 9 February 2011

Transaction Management. Pearson Education Limited 1995, 2005

Transactions. Kathleen Durant PhD Northeastern University CS3200 Lesson 9

Unit 2. Unit 3. Unit 4

CSE 344 MARCH 9 TH TRANSACTIONS

Transaction Management

CHAPTER 3 RECOVERY & CONCURRENCY ADVANCED DATABASE SYSTEMS. Assist. Prof. Dr. Volkan TUNALI

In This Lecture. Exam revision. Main topics. Exam format. Particular topics. How to revise. Exam format Main topics How to revise

Database Systems CSE 414

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

L i (A) = transaction T i acquires lock for element A. U i (A) = transaction T i releases lock for element A

SQL: Transactions. Introduction to Databases CompSci 316 Fall 2017

ROEVER ENGINEERING COLLEGE

Chapter 20 Introduction to Transaction Processing Concepts and Theory

CSE 344 MARCH 25 TH ISOLATION

Relational Databases. Week 13 LBSC 671 Creating Information Infrastructures

Sample Exam for CSE 480 (2016)

Final Review. CS 377: Database Systems

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

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI

CSE 444 Midterm Exam

TRANSACTION PROPERTIES

CSE 190D Database System Implementation

TRANSACTION PROCESSING PROPERTIES OF A TRANSACTION TRANSACTION PROCESSING PROPERTIES OF A TRANSACTION 4/3/2014

Database Design Theory and Normalization. CS 377: Database Systems

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

User Perspective. Module III: System Perspective. Module III: Topics Covered. Module III Overview of Storage Structures, QP, and TM

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

Transactions and Concurrency Control

SQL Interview Questions

Chapter 18 Strategies for Query Processing. We focus this discussion w.r.t RDBMS, however, they are applicable to OODBS.

Multi-User-Synchronization

Sample Exam for CSE 480 (2017) KEY

D.K.M COLLEGE FOR WOMEN(AUTONOMOUS),VELLORE DATABASE MANAGEMENT SYSTEM QUESTION BANK


2011 DATABASE MANAGEMENT SYSTEM

Introduction to Data Management CSE 344

Database Systems CSE 414

References. Transaction Management. Database Administration and Tuning 2012/2013. Chpt 14 Silberchatz Chpt 16 Raghu

GUJARAT TECHNOLOGICAL UNIVERSITY


Database Management Systems

CISC437/637 Database Systems Final Exam

Carnegie Mellon Univ. Dept. of Computer Science Database Applications. General Overview NOTICE: Faloutsos CMU SCS

A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS

15CS53: DATABASE MANAGEMENT SYSTEM

Database Processing. Fundamentals, Design, and Implementation. Global Edition

Final Exam CSE232, Spring 97, Solutions

Advanced Databases. Transactions. Nikolaus Augsten. FB Computerwissenschaften Universität Salzburg

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

Transactions and Concurrency Control. Dr. Philip Cannata

SYED AMMAL ENGINEERING COLLEGE

Database Systems CSE Comprehensive Exam Spring 2005

Database System Concepts

Introduction to Data Management CSE 344

The University of Nottingham

Database Management Systems Written Exam

CSE 444: Database Internals. Lectures Transactions

Introduction to Databases, Fall 2005 IT University of Copenhagen. Lecture 10: Transaction processing. November 14, Lecturer: Rasmus Pagh

CSC 261/461 Database Systems Lecture 13. Fall 2017

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

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

SQL: Transactions. Announcements (October 2) Transactions. CPS 116 Introduction to Database Systems. Project milestone #1 due in 1½ weeks

Security Mechanisms I. Key Slide. Key Slide. Security Mechanisms III. Security Mechanisms II

VIEW OTHER QUESTION PAPERS

COSC 304 Introduction to Database Systems. Advanced SQL. Dr. Ramon Lawrence University of British Columbia Okanagan

CISC437/637 Database Systems Final Exam

McGill April 2009 Final Examination Database Systems COMP 421

Babu Banarasi Das National Institute of Technology and Management

Transaction Management & Concurrency Control. CS 377: Database Systems

SAMPLE FINAL EXAM SPRING/2H SESSION 2017

Topics in Reliable Distributed Systems

Transaction Processing Concepts and Theory. Truong Tuan Anh CSE-HCMUT

CSC 261/461 Database Systems Lecture 21 and 22. Spring 2017 MW 3:25 pm 4:40 pm January 18 May 3 Dewey 1101

Final Exam CSE232, Spring 97

What happens. 376a. Database Design. Execution strategy. Query conversion. Next. Two types of techniques

Introduction to Data Management CSE 414

XI. Transactions CS Computer App in Business: Databases. Lecture Topics

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons)

NAPIER UNIVERSITY SCHOOL OF COMPUTING FIRST DIET (SEMESTER TWO) EXAMINATION SESSION CS 71012: DATABASE SYSTEMS TIME ALLOWED: 2 HOURS

Transcription:

CSCE 4523 Introduction to Database Management Systems Final Exam Fall 2016 I have neither given, nor received,unauthorized assistance on this exam. Signature Printed Name: Attempt all of the following questions. The test consists of 29 multiple choice/fill in the blank/short answer questions. For multiple choice questions, indicate which you consider the single most appropriate answer. Indicate your selection circling your selection. For fill in the blank questions, provide the missing word or fill in the letter for the most appropriate option, when options are given. The exam questions total 61 points and the exam will be graded out of 60, so there is 1 bonus point built in. If you have any questions about the questions, write your assumptions in the margin and answer the question as you understand it. You may bring in any database textbook and 1 page of paper with anything written on it, front and back. If you do not bring in a textbook, you may instead bring in 3 pages of paper with anything written on them, front and back. 1

1. In relational algebra, R a. R X S b. R X (condition) S c. σ (condition) R X σ (condition) S d. σ (condition) (R X S) e. None of the above (condition) S can be rewritten as: 2. (4 points) Fill in the blanks. Use each letter exactly once: THETA JOIN EQUIJOIN NATURAL JOIN OUTER JOIN a. The most general type of join. b. Displays tuples in result with no matching values in other table. c. Joins attributes with the same values d. Joins attributes with the same name and same values. 3. (4 points) Consider a database that includes two relations Student and Program S P Matric_No F_Name L_Name Prog_Code 04009991 Alicia Smith 0001 04009992 Alan Smith 0002 04009995 Alicia Bush 0001 04009995 John Smith 0001 Prog_Code P_Name 0001 Computing 0002 Soft. Eng. Fill in the SQL expression that would return the following result: F_Name L_Name Program Alicia Smith Computing John Smith Computing 2

SELECT F_Name, L_Name, AS FROM S, P WHERE S.Prog_Code = AND S.Prog_Code = AND = Smith ; 4. (3 points) Given a database: Customer(Cust_no, Name, Address) Order(Order_no, Cust_no, C_Date, Completed) Make(Order_no, Maker_no, Dress_style, Colour) Fill in the blanks for the SQL command which will most likely return the date and maker number of all orders that are not yet completed that have been ordered by Customer number 1234. SELECT, Maker_no FROM Customer, Order, Make WHERE 1234 AND = no ; 5. Assume you have a sorted file that we want to be able to do binary search on. Each record has the following fields: Name (max 30 chars), SSN (9 chars), Address (max 40 chars). Assume that the file is stored on Linux, we use 1 byte per character, and we separate the fields with blanks and the records with newlines. How big is each record? a) 80 bytes b) 81bytes c) 82 bytes d) 83 bytes e) The record sizes will vary based on the string lengths. 6. In JDBC and ODBC, there is a class named Statement. Which the following methods in Statement should be used to run SQL INSERT and DELETE commands? a) execute b) executeupdate c) update d) executequery e) query 3

7. In JDBC and ODBC, there is a class named Statement. Which the following methods in Statement should be used to run SQL SELECT commands? a) executeupdate b) execute c) update d) executequery e) query 8. (6 points) Fill in the blanks below based on the diagram above. Use each letter exactly once: Registers a. Primary key. datejoined Manages Lease Supervises b. Recursive relationship type c. Binary relationship type. d. Relationship attribute. e. Entity type. branchno in Branch f. Ternary relationship type. 4

9. When modeling binary relationships in an ER diagram, which cardinality ratios are possible? a) 1:1 b) 1 : N c) M : N d) all of above e) none of the above 10. (3 points) Consider a relation R(A, B, C, D, E). in which A, B is the primary key. R has the following functional dependencies: A, B C, D, E A C R is in at least 1 st normal form because a) There are no partial dependencies b) There are no multivalued attributes c) There are dependencies on a non-candidate key attribute d) There are no transitive dependencies e) It is not in 1NF. R is not in 2 nd normal form because a) There are partial dependencies b) There are multivalued attributes c) There are dependencies on a non-candidate key attribute d) There are transitive dependencies e) It is already in 2NF. After transforming R into 2 nd normal form, the resulting relations would be: a) It is in 2 nd normal form. b) R1 (A, B, C, D) & R2 (A, E) c) R1 (A, C, E) & R2 (B, D) d) R1 (A, B, D, E) & R2 (A, C) e) None of the above. 11. If a table has been normalized so that the determinants of all functional dependencies are candidate keys, then the highest normal form that the table is in is: a) UNF b) 1NF c) 2NF d) 3NF e) BCNF 5

12. (3 points) Consider the relation Student(StudentId, Name, Birthyear, Age, Major, Dept) in which StudentId is the primary key. Student has the following functional dependencies: StudentId Name, Birthyear, Major Major Dept Birthyear Age Student is in at least 2 nd normal form because a) There are no transitive dpendencies b) There are no partial dependencies c) There are no multivalued attributes d) b and c e) It is not in 2NF. Student is not in 3 rd normal form because a) There are transitive dependencies b) There are partial dependencies c) There are multivalued attributes d) There are dependencies on a non-candidate key attribute e) It is already in 3NF. After transforming Student into 3 rd normal form, the resulting relations would be: a) Student(StudentId, Name, Birthyear, Age, Major, Dept) & Demographics(Birthyear, Age) & Academics(Major, Dept) b) Student(StudentId, Name, Birthyear, Major, Dept) & Demographics(Birthyear, Age) c) Student(StudentId, Name, Birthyear, Major) & Demographics(Birthyear, Age) & Academics(Major, Dept) d) Student(StudentId, Name, Birthyear, Age, Major, Dept) & Demographics(Birthyear, Age) e) It is in 3 rd normal form f) None of the above 13. The difference between 3NF and BCNF is that 3NF allows the following (that BCNF does not) a) Transitive dependencies b) Dependencies on non-candidate keys c) Multivalued dependencies d) Partial dependencies e) There is no difference. 6

14 The difference between BCNF and 4NF is that BCNF allows the following (that 4NF does not) a) Transitive dependencies b) Dependencies on non-candidate keys c) Multivalued dependencies d) Partial dependencies e) There is no difference. 15. Which is a disadvantage of the Web-DBMS approach? a) Security b) Standardization c) Easier GUI development d) Simplicity e) Scalable deployment 16. Which an advantage of the Web-DBMS approach? a) Reliability b) Performance decrease c) Decreased bandwidth d) Statelessness e) Platform independence 17. The database system must take special actions to ensure that transactions operate properly without interference from concurrently executing database statements. This property is referred to as a) Atomicity b) Consistency c) Isolation d) Durability e) All of the above 18. Which of the following is all-or-none property for transaction processing? a) Atomicity b) Consistency c) Isolation d) Durability e) All of the above 19. When a transaction reads the value of from the database that based on an uncommitted transaction, it is called a: a) Lost Update b) Dirty Read c) Inconsistent Analysis d) Non-serializable e) None of the above 7

20. In two phase locking, transaction obtains lock and release it in (respective order): a) Shrinking phase & Initial Phase b) Running phase & Completion Phase c) Growing phase & Shrinking phase d) Initial phase & Completion Phase e) None of the above 21. Consider following transactions Which of the following schedules below is the correct serialization (i.e., an equivalent non-serial schedule) of the above? a) T1 - >> T2 ->> T3 b) T2 ->> T3 ->> T1 c) T1 ->> T3 ->> T2 d) T3 ->> T2 ->> T1 e) This is a non-serializable schedule. 22. Rather than avoiding conflicts using locking or timestamping, some systems use optimistic scheduling techniques because: a) They are just naturally optimistic database designers b) Invalid data in the database is unimportant c) Rollbacks are inexpensive d) Conflicts are rare e) None of the above 23. Which is NOT true of Deferred Updates: a) Updates are not written to the database until after a transaction has reached its commit point. b) If transaction fails before commit, it will not have modified database and so no undoing of changes required. c) May be necessary to redo updates of committed transactions as their effect may not have reached database. d) They are all true. 8

24. Which is not a property of B+ trees: a) The tree is balanced. b) Internal nodes can store at most M-1 keys and M pointers. c) Internal nodes are at least half full. d) The internal nodes store all the keys and all the associated records. e) The leaf nodes store the records in random order. 25. (2 points) Draw the following B+ tree after the insertion of 13: 26. (2 points) Draw the following B+ tree after the deletion of 16: 9

27. The most efficient ordering of relational algebra operations in a relational algebra tree, from bottom to top, is: a) Joins at the bottom, then projects, then selects. b) Selects at the bottom, then projects, then joins. c) Projects at the bottom, then selects, then joins. d) Cartesian products at the bottom and one big select at the top. e) Order doesn t matter. 28. When implementing JOIN on relations R and S, which is not true about the processing time: a) Is at least R+S. b) Is at most R*S c) Varies depending on what index structures, if any are used. d) Is measured in terms of comparison operations in memory. e) The above are all true. 29. (14 points) For each of the questions below, circle either or False False In 5NF, we decompose all relations into as many relations as possible without introducing errors. False In 5NF, all tables consist of just the primary key and one attribute. False CGI stands for Complex Graphical Interface. False HTTP is a stateless protocol. False PHP scripts run on the client machine. False The consistency property ensures that any transaction will bring the database from one valid state to another. False The durability property ensures that once a transaction has been committed, its effects are permanent. False Starvation is a problem encountered in concurrent computing wherein two processes are blocked forever, awaiting each others resources. False If the Precedence Graph for a schedule contains a cycle, then the schedule is serializable. False In Strict Two-Phase Locking, all locks are removed as soon as possible. False Dynamic query optimization adds a overhead to every query execution. False If the Relation Connection Graph has cycles, that means that the query is incorrectly formulated. False Many different relational algebra trees (RATs) can be constructed for a single SQL query. False Query optimizers estimate the cost for all possible execution trees and then pick the least expensive. 10