Database Management Systems (COP 5725) (Spring 2007)

Similar documents
The University of British Columbia

King Fahd University of Petroleum and Minerals

CS145 Final Examination

A database can be modeled as: + a collection of entities, + a set of relationships among entities.

Chapter 2: Entity-Relationship Model. Entity Sets. Entity Sets customer and loan. Attributes. Relationship Sets. A database can be modeled as:

Conceptual Data Models for Database Design

You have 45 minutes to work on this exam. It is a "closed-book/closed-notes" test.

CPSC 310: Database Systems / CSPC 603: Database Systems and Applications Exam 2 November 16, 2005

King Fahd University of Petroleum and Minerals

Chapter 6: Entity-Relationship Model

NAME (from your UF ID): UF ID#: (Please PRINT) Quiz 1 -- Spring 2017

Database Management System 10 Conversion of ER model to Relational Model

1. (a) Briefly explain the Database Design process. (b) Define these terms: Entity, Entity set, Attribute, Key. [7+8] FIRSTRANKER

NAME (as it appears on your UF ID): (Please PRINT) CEN Software Engineering

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

Test 2 Version A. On my honor, I have neither given nor received inappropriate or unauthorized information at any time before or during this test.

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

CSE-3421 Test #1 Design

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

Database Management Systems (COP 5725) Homework 2

L11: ER modeling 4. CS3200 Database design (sp18 s2) 2/15/2018

CSE 131 Introduction to Computer Science Fall 2016 Exam I. Print clearly the following information:

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

Computer Security Spring 2010 Paxson/Wagner HW 4. Due Thursday April 15, 5:00pm

Chapter 6: Entity-Relationship Model. The Next Step: Designing DB Schema. Identifying Entities and their Attributes. The E-R Model.

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

CS 111X - Fall Test 1

The Next Step: Designing DB Schema. Chapter 6: Entity-Relationship Model. The E-R Model. Identifying Entities and their Attributes.

Using High-Level Conceptual Data Models for Database Design A Sample Database Application Entity Types, Entity Sets, Attributes, and Keys

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

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

EECS-3421a: Test #1 Design

Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity Sets Extended E-R Features Design of the Bank Database Reduction to

Chapter 6: Entity-Relationship Model

Elements of the E-R Model

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

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

CSCC43H: Introduction to Databases

Advance Database Management System

L12: ER modeling 5. CS3200 Database design (sp18 s2) 2/22/2018

Problem Pts Score Grader Problem Pts Score Grader

CS145 Midterm Examination

Fundamentals of Databases

CS 186 Midterm, Spring 2003 Page 1

erfq Quoting Training Manual Version 3.1

Database Management Systems (COP 5725) Homework 3

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

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

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

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

Homework 2: E/R Models and More SQL (due February 17 th, 2016, 4:00pm, in class hard-copy please)

CS145 Midterm Examination

CHAPTER 3: DATA MODELING USING THE ENTITY-RELATIONSHIP (ER) MODEL

Database Systems CSE Comprehensive Exam Spring 2005

CMSC330 Spring 2014 Midterm #2. Score 1 OCaml types & type

Problem. Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications

Topic 5: Mapping of EER Diagrams to Relations

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

Chapter 6: Entity-Relationship Model

Unit I. By Prof.Sushila Aghav MIT

Chapter 2: Entity-Relationship Model

CS 338: Computer Applications in Business: Databases

CS 1301 Exam 2 Fall 2010

MCS-378 Intraterm Exam 1 Serial #:

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Problem. Faloutsos - Pavlo CMU SCS /615

1. Read each problem carefully and follow the instructions.

The Entity/Relationship (E/R) Model & DB Design. csc343, Introduction to Databases Renée J. Miller and Fatemeh Nargesian and Sina Meraji Winter 2018

Administrivia. Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Course Topics. Problem

Database Technologies. Madalina CROITORU IUT Montpellier

Schema And Draw The Dependency Diagram

COMP Instructor: Dimitris Papadias WWW page:

Chapter 6: Entity-Relationship Model

ER to Relational Mapping

L22: The Relational Model (continued) CS3200 Database design (sp18 s2) 4/5/2018

CPSC 211, Sections : Data Structures and Implementations, Honors Final Exam May 4, 2001

University of Virginia Department of Computer Science. CS 4501: Information Retrieval Fall 2015

CS 111X - Fall Test 1 - KEY KEY KEY KEY KEY KEY KEY

Conceptual Modeling in ER and UML

Example: specific person, company, event, plant

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

Lecture 14 of 42. E-R Diagrams, UML Notes: PS3 Notes, E-R Design. Thursday, 15 Feb 2007

CS145 Midterm Examination

MCS-378 Intraterm Exam 1 Serial #:

Problem Possible Points Points Earned Problem Possible Points Points Earned Test Total 100

Answer 2.3 The ER diagram is shown in Figure 2.1.

CS145 Final Examination

Intro to DB CHAPTER 6

Entity-Relationship Model

THE ENTITY- RELATIONSHIP (ER) MODEL CHAPTER 7 (6/E) CHAPTER 3 (5/E)

Conceptual Data Modeling

Database Management Systems LECTURE NOTES 2

Chapter 6: Relational Database Design

Entity-Relationship Model. From Chapter 5, Kroenke book

CS112 Spring 2012 Dr. Kinga Dobolyi. Exam 2. Do not open this exam until you are told. Read these instructions:

4/10/2018. Relational Algebra (RA) 1. Selection (σ) 2. Projection (Π) Note that RA Operators are Compositional! 3.

Database Technologies. Madalina CROITORU IUT Montpellier

Introduction. Requirements. Internet Connection Microsoft Windows 98 or above Microsoft Internet Explorer Version 5.5 or above

Lecture 16. The Relational Model

Entity Relationship Data Model. Slides by: Shree Jaswal

Enhanced Entity Relationship: From ERD to Relational Model Exercise & Answer

Transcription:

Database Management Systems (COP 5725) (Spring 2007) Instructor: Dr. Markus Schneider TA: Imran Hassan Ganesh Viswanathan One-Third Exam You have 100 minutes to complete the exam. Please read the entire exam before starting on it. It would be a good idea to think carefully about each problem before answering. Please be sure to write your name, UFID and email address legibly below. Relax and good luck. Please keep in mind the code number below that has been assigned to you for future reference (mainly for anonymous publication of exam results and grades). Please only use the stapled paper sheets of the exam. Note that it is not allowed to remove the staples. Name: UFID Email Address: Code: Pledge (Must be signed according to UF Honor Code) On my honor, I have neither given nor received unauthorized aid in doing this assignment. Signature For scoring use only: Maximum Exercise 1 30 Exercise 2 30 Exercise 3 20 Exercise 4 20 Total 100 Received 1

Exercise 1 (Knowledge Questions) [30 points] (a) By using mathematical notation and a brief description of what the notation means, explain the following notions precisely (Do not use examples!): 1. Alternative definition of relation. (6 points) 2. Tuple. (6 points) 3. Union operation on relations. (6 points) (b) Define briefly in complete sentences and in your own words the following concepts: 5. What are multivalued attributes? (6 points) 6. Show by example using E-R diagrams (6 points) 1. Binary relationship set with one entity set. 2. Ternary relationship set. 2

Exercise 2 (ER Model) [30 points] Provide an ER Diagram that describes the following requirements for a Online Auction System: There are two types of users: Bidders and Sellers Both types of users exist as users(identified by a username) that represent individuals. One individual can exist as both bidder and seller. Items to be auctioned are categorized Auctions can have a reserve price and an item can be auctioned more than once either by a different user or if the reserve price in previous auctions was not met. Regular bids are entered by bidders before auction close time. Proxy bids are automatically incrementing bids that define a maximum amount, a starting amount and an increment over the max bid so that the amount can automatically be updated whenever a higher bid is entered. Every time a higher bid is entered the system parses through the proxy bids and enters regular bids depending on the proxy bids found for that item. Besides the standard contact information(ph#, email), individuals have addresses for billing, shipping and residence information, each of which might be different from each other. Bidders and sellers can provide reviews of other individuals only if they have been related through any auction. Reviews include a score(min 0, max 5) and detailed comments from the individual that inputs the review plus a response from the individual who is targeted by the review. 3

4

Exercise 3 (Other ER related) [20 points] Consider the ER diagram shown below for part of a BANK database. (a) Transform the following Entity-Relationship Diagram into a corresponding relational schema. You need not include data types in the schema.(10 points) 5

(b) Is there any weak entity type? If so, give its name(s), partial key and identifying relationship. (5 points) (c) Suppose that every customer must have at least one account but is restricted to at most two loans at a time, and that a bank branch cannot have more than 1000 loans. How does this show up on the (min, max) constraints? Write the answer in this form, i.e. [Relationship Entity1 (min, max), Entity2 (min, max)] (5 points) 6

Exercise 4 (Relational Algebra) [5x4 = 20 points] Given the following relational schema: PERSON(PersonID, Initials, LastName, DOB, Sex) DOCTOR(PersonID,RoomNo,PhoneNo,DateQualified,DateAppointed) PATIENT(PersonID,DateRegistered,RegisteredWith) APPOINTMENT(DoctorID,PatientID,Date,Time,Duration) TREATMENT(DoctorID,PatientID,Condition,Treatment,Start,End) and the following queries in natural language: 1. Retrieve PersonID and PhoneNo from all DOCTORs. 2. Retrieve PersonID and LastName from all those PERSONs whose LastName is Jackson. 3. Retrieve PatientID of the patients who have APPOINTMENTs with the doctor(s), however, do not have any TREATMENTs prescribed by the doctor(s). 4. Retrieve PatientID of the patients who have both APPOINTMENTs with the doctor(s) and TREATMENTs prescribed by the doctor(s). State all four queries using relational algebra base on the given relational schema. 7

8