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

Similar documents
King Fahd University of Petroleum and Minerals

Exam I Computer Science 420 Dr. St. John Lehman College City University of New York 12 March 2002

Chapter 4. The Relational Model

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

Relational Model. Rab Nawaz Jadoon DCS. Assistant Professor. Department of Computer Science. COMSATS IIT, Abbottabad Pakistan

King Fahd University of Petroleum and Minerals

Introduction to Relational Databases. Introduction to Relational Databases cont: Introduction to Relational Databases cont: Relational Data structure

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

Do not turn over until you are told to do so by the invigilator. Module Contact: Dr. Beatriz de la Iglesia (CMP)

TMA01 Fall 2011 (Cut-off date 8 Dec 2011)

Enhanced Entity- Relationship Models (EER)

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

COURSE OVERVIEW THE RELATIONAL MODEL. CS121: Relational Databases Fall 2017 Lecture 1

COURSE OVERVIEW THE RELATIONAL MODEL. CS121: Introduction to Relational Database Systems Fall 2016 Lecture 1

14 October 2015 EECS-3421A Test #1 p. 1 of 14. EECS-3421A Test #1. Design

ADVANCED DATABASES ; Spring 2015 Prof. Sang-goo Lee (11:00pm: Mon & Wed: Room ) Advanced DB Copyright by S.-g.

Relational Model History. COSC 416 NoSQL Databases. Relational Model (Review) Relation Example. Relational Model Definitions. Relational Integrity

THE UNIVERSITY OF BRITISH COLUMBIA CPSC 304: MIDTERM EXAMINATION SET A OCTOBER 2016

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

4. Entity Relationship Model

Draw A Relational Schema And Diagram The Functional Dependencies In The Relation >>>CLICK HERE<<<

CS 4400 Exam 2 ANSWER KEY

Lecture 03. Spring 2018 Borough of Manhattan Community College

King Fahd University of Petroleum and Minerals

Babu Banarasi Das National Institute of Technology and Management

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

Midterm Review. Winter Lecture 13

DATABASE MANAGEMENT SYSTEM SHORT QUESTIONS. QUESTION 1: What is database?

Module 2 : Entity-Relationship Model 15

CS121 MIDTERM REVIEW. CS121: Relational Databases Fall 2017 Lecture 13

The Relational Model Constraints and SQL DDL

Chapter 2 Introduction to Relational Models

Let s briefly review important EER inheritance concepts

Database Management Systems,


Midterm Exam (Version B) CS 122A Spring 2017

Course on Database Design Carlo Batini University of Milano Bicocca Part 5 Logical Design

COSC344 Database Theory and Applications. σ a= c (P) Lecture 3 The Relational Data. Model. π A, COSC344 Lecture 3 1

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

Course on Database Design Carlo Batini University of Milano Bicocca

GUJARAT TECHNOLOGICAL UNIVERSITY

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

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

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

CS317 File and Database Systems

CSE 344 Midterm. November 9, 2011, 9:30am - 10:20am. Question Points Score Total: 100

TEACHING & ASSESSMENT PLAN

; Spring 2008 Prof. Sang-goo Lee (14:30pm: Mon & Wed: Room ) ADVANCED DATABASES

CS 338: Computer Applications in Business: Databases

Class Information. Textbooks. Grading. Final Project. Grading. CS 440: Database Management Systems. Instructor:

The University of British Columbia

Midterm Exam #2 (Version A) CS 122A Winter 2017

The Relational Model

VIEW OTHER QUESTION PAPERS

A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS

Chapter 9: Relational DB Design byer/eer to Relational Mapping Relational Database Design Using ER-to- Relational Mapping Mapping EER Model

Lecture 03. Fall 2017 Borough of Manhattan Community College

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

BCS THE CHARTERED INSTITUTE FOR IT BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT

Barton Community College

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

Database Management System 9

Informatics 1: Data & Analysis

FINAL EXAM REVIEW. CS121: Introduction to Relational Database Systems Fall 2018 Lecture 27

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

Refresher: ER-modeling, logical relational model, dependencies. Toon Calders

Midterm Exam #1 (Version B) CS 122A Spring 2018

CS145 Midterm Examination

RELATIONAL DATA MODEL

Examination paper for TDT4145 Data Modelling and Database Systems

Conceptual Design. The Entity-Relationship (ER) Model

CSE-3421 Test #1 Design

SAMPLE FINAL EXAM SPRING/2H SESSION 2017

ER Model. Objectives (2/2) Electricite Du Laos (EDL) Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 1

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

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

8) A top-to-bottom relationship among the items in a database is established by a

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

CSE 344 Midterm. November 9, 2011, 9:30am - 10:20am. Question Points Score Total: 100

Informationslogistik Unit 5: Data Integrity & Functional Dependency

Review for Exam 1 CS474 (Norton)

Name: Database Systems ( 資料庫系統 ) Midterm exam, November 15, 2006

BSc (Hons) Software Engineering. BSc (Hons) Computer Science with Network Security. Examinations for / Semester 2 & 2017 / Semester 1

9/8/2018. Prerequisites. Grading. People & Contact Information. Textbooks. Course Info. CS430/630 Database Management Systems Fall 2018

Database Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.

CS275 Intro to Databases

The Relational Model of Data (ii)

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

Birkbeck. (University of London) BSc/FD EXAMINATION. Department of Computer Science and Information Systems. Database Management (COIY028H6)

INF 315E Introduction to Databases School of Information Fall 2015

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

CS430 Final March 14, 2005

6 February 2014 CSE-3421M Test #1 w/ answers p. 1 of 14. CSE-3421M Test #1. Design

ITCS 3160 DATA BASE DESIGN AND IMPLEMENTATION

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

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

CSE 562 Database Systems

Solved MCQ on fundamental of DBMS. Set-1

Higher National Diploma in Information Technology

Lecture Notes for 3 rd August Lecture topic : Introduction to Relational Model. Rishi Barua Shubham Tripathi

Transcription:

CSCI 585 Database Systems Prof. Dennis McLeod Sample Midterm Exam The purpose of this sample exam is to show the style of questions the exams will contain. It is not an indication of scope of topic coverage per se. We do not provide solutions for the sample exam; you can use it as a study tool to prepare for the exams this semester, and of course ask questions regarding any issues that arise. But, the CSCI585 staff will not solve the problems for you - remember, the sample is a study tool for you. The duration of this exam is 80 minutes. Do not start the exam until you are instructed to do so. If you solve your exam using pencil or erasable pen, you forfeit your right to a re-grading of your exam. This is a closed book exam. You are only allowed one 8x11 inch sheet of paper for notes. You are not allowed to share notes or any other materials with other students during the exam. The use of electronic equipment is prohibited during the exam. All laptops, netbooks, PDAs, cell phones, etc are to be switched off. In case you require clarification for an exam problem, note that you are allowed to ask questions only during the first 45 minutes of the exam. Follow the instructions of the exam proctors at all times. For Scoring Use Only Maximum Problem 1 20 Received Problem 2 15 Problem 3 30 Problem 4 35 TOTAL 100 Page 1 of 8

Problem 1 (20 points) For each concept on the left, identify the best matching phrase in the right column. Indicate the number of best matching phrase. (2 points each) a. Projection of a relational attribute b. RDF c. Transaction d. Underlying domain of a relational attribute e. BCF f. Tuple g. Physical data independence 1. Unit of information 2. A framework for facts 3. Multiple inheritance 4. Subclasses don't share members 5. Universal quantification 6. Set of current values 7. Set of relational (attribute, value) pairs 8. Subject-predicate-object expression 9. Set of possible values 10. Foreign key 11. Polymorphic type system 12. Separation of logical and external levels h. Disjoint subclasses i. Conceptual schema j. Referential integrity constraint 13. Ensures that conceptual schema does not have to change when physical storage is reorganized 14. One fact in one place 15. Conceptual unit of manipulation Page 2 of 8

Problem 2 (15 points) a. Which of these constitutes a minimal set of attributes for which it holds that: no two distinct tuples in the relation can have the same values for the attributes in this set? (3 points) i. Candidate key ii. Superkey iii. Foreign key iv. Primary key 1. i only 2. iv only 3. i and iv 4. i, ii and iv 5. i, iii and iv 6. i, ii, iii and iv b. A relation in BCF (Boyce-Codd ormal Form): (3 points) 1. Allows partial dependencies on a key 2. Is an enforcement mechanism for entity integrity 3. Has no transitive functional dependencies 4. All of the above 5. one of the above 6. Both 1 and 2 7. Both 1 and 3 ( ) ( ) c. Rank the following from the least expressive to the most expressive: (4 points) EER model, OWL-DL, pure relational model d. List a minimal set of relational algebra operators needed to satisfy relational completeness. (5 points) Page 3 of 8

Players Coaches Agents People Problem 3 (30 points) a. Consider the following CIOM diagram: SS(1,nn) SS -1 (1) salary(1) salary -1 (m) position(1) position -1 (m) salary(1) salary -1 (m) experience(1) experience -1 (m) license_no(1,nn) license_no -1 (1) - X Y Z Describe what the members of X, Y and Z represent. List the attributes of X, Y and Z. (15 points) Page 4 of 8

b. Consider the following CIOM diagram: a1(1,nn) a1-1 (1) A a2(1) a2-1 (m) S S b1(1) b1-1 (m) B C c1(1) c1-1 (m) S Show two different ways in which this CIOM diagram can be reduced to a relational schema. Discuss briefly what assumptions or conditions are necessary for each representation to be considered a valid mapping from the CIOM diagram given above. (15 points) Page 5 of 8

Problem 4 (35 points) Consider the following relational database conceptual schema used to keep track of patient visits in a medical clinic: Person (SS, ame, DoB, Gender, PlaceOfBirth) [] [S] [D] [S] [S] Doctor (SS, Specialty) [] [S] Patient (SS, InsuranceID, InsuranceProvider, MedicalRecordID) [] [] [S] [] MedicalVisit (Date, Doctor, Patient, Diagnosis) [D] [] [] [S] In the above, primary keys are underlined. The domain of each attribute is stated using the following convention: umbers [], Strings [S] and Dates [D]. The following referential integrity constraints exist: From Doctor.SS From Patient.SS From MedicalVisit.Doctor From MedicalVisit.Patient to Person.SS to Person.SS to Doctor.SS to Patient.SS Answer the following questions based on the above schema. a. In the MedicalVisit table the primary key is defined as (Date, Doctor, Patient). If the primary key were to be changed to (Doctor, Patient), how would it affect the design of the database? (5 points) Page 6 of 8

b. Let the number of tuples in Person = x, the number of tuples in Doctor = y and the number of tuples in Patient = z. How are the sizes of x, y and z related to one another. Briefly justify. (5 points) c. Write the following queries in relational algebra: i. Find the name and gender of all doctors whose specialty is dentistry. (5 points) ii. Find the names of insurance providers who insure patient(s) who were born in Los Angeles (5 points) Page 7 of 8

d. Solve the following queries using SQL. You may express your answers in either basic SQL as presented in lectures or ASI SQL. i. List all specialties available in the clinic. (5 points) ii. Find the number of patients who visited a pediatrician on October 21, 2010. A pediatrician is a doctor whose specialty is pediatrics (children s health). (5 points) iii. List the SS and name of all infant patients. An infant is defined as someone who was born on or after October 21, 2008. (5 points) Page 8 of 8