Homework 2. Develop an EER model for the following situation using the EER diagram,

Similar documents
Translating an ER Diagram to a Relational Schema

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

CS 405G: Introduction to Database Systems

Conceptual Modeling in ER and UML

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

Conceptual Design. The Entity-Relationship (ER) Model

Enhanced Entity- Relationship Models (EER)

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

Database Management Systems

CMPT 354 Database Systems. Simon Fraser University Fall Instructor: Oliver Schulte

CSE 530A. ER Model to Relational Schema. Washington University Fall 2013

King Fahd University of Petroleum and Minerals

DATABASE DESIGN I - 1DL300

Keys are fields in a table which participate in below activities in RDBMS systems:

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

CS 338 The Enhanced Entity-Relationship (EER) Model

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

GUJARAT TECHNOLOGICAL UNIVERSITY

Advance Database Management System

DATABASE DESIGN I - 1DL300

High-Level Database Models (ii)

The Entity-Relationship Model

Intermediate SQL ( )

DATABASE DESIGN. Fields in database table have a data type. Some of the data types used in database table are explained below.

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

CS127 Homework #3. Due: October 11th, :59 P.M. Consider the following set of functional dependencies, F, for the schema R(A, B, C, D, E)

Course: Honors AP Computer Science Instructor: Mr. Jason A. Townsend

Database Concepts. CS 377: Database Systems

Database Design. Database Design I: The Entity-Relationship Model. Entity Type (con t) Representation in Relational Model.

Department of Computer Science University of Cyprus. EPL342 Databases. Lab 2

Entity Relationship Data Model. Slides by: Shree Jaswal

Chapter 4: Intermediate SQL

Database Management Systems,

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

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

Database Management Systems MIT Introduction By S. Sabraz Nawaz

Database Design. 2-3 Entity Relationship Modeling and ERDs. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

EGCI 321: Database Systems. Dr. Tanasanee Phienthrakul

The Relational Model 2. Week 3

CONCEPTUAL DESIGN: ER TO RELATIONAL TO SQL

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

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

High Level Database Models

EECS 647: Introduction to Database Systems

Conceptual Design with ER Model

Homework Assignment 3. November 11th, 2014 Due on November 25th, 12:30pm (noon) CS425 - Database Organization Results

DATABASTEKNIK - 1DL116

Data Modeling. Yanlei Diao UMass Amherst. Slides Courtesy of R. Ramakrishnan and J. Gehrke

Oklahoma State University Institute of Technology Face-to-Face Common Syllabus Fall 2017

The University Of New South Wales. Final Exam November 2006 COMP9311. Database Systems

King Fahd University of Petroleum and Minerals

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

Informatics 1: Data & Analysis

22/01/2018. Data Management. Data Entities, Attributes, and Items. Data Entities, Attributes, and Items. ACS-1803 Introduction to Information Systems

Database Design and the E-R Model (7.4, )

COWLEY COLLEGE & Area Vocational Technical School

Topic 5: Mapping of EER Diagrams to Relations

ACS-1803 Introduction to Information Systems. Instructor: Kerry Augustine. Data Management. Lecture Outline 2, Part 2

LIS 2680: Database Design and Applications

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

DBS Assignment I. 1. With necessary examples, explain any four major disadvantages of keeping organizational information in a file-processing system.

Answer 2.3 The ER diagram is shown in Figure 2.1.

Introduction to Data Management. Lecture #4 (E-R Relational Translation)

INF 315E Introduction to Databases School of Information Fall 2015

Mahathma Gandhi University

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

The Entity-Relationship Model. Overview of Database Design

From ER to Relational Model. Book Chapter 3 (part 2 )

King Fahd University of Petroleum and Minerals

Translation of ER-diagram into Relational Schema. Dr. Sunnie S. Chung CIS430/530

Computer Science Technology Department

Chapter (4) Enhanced Entity-Relationship and Object Modeling

Who, where, when. Database Management Systems (LIX022B05) Literature. Evaluation. Lab Sessions. About this course. After this course...

CS 146 Database Systems

Ch 9: Mapping EER to Relational. Follow a seven-step algorithm to convert the basic ER model constructs into relations steps 1-7

Course Outline. TERM EFFECTIVE: Spring 2017 CURRICULUM APPROVAL DATE: 05/09/2016

SYSTEM CODE COURSE NAME DESCRIPTION SEM

Department of Accounting & Law, School of Business. State University of New York at Albany. Acc 682 Analysis & Design of Accounting Databases

The Entity-Relationship Model (ER Model) - Part 2

SYLLABUS. Departmental Syllabus. Structured Query Language (SQL)

CSC 261/461 Database Systems Lecture 8. Spring 2018

SYLLABUS. Departmental Syllabus

HOUSTON COMMUNITY COLLEGE BUSINESS TECHNOLOGY NORTHEAST COLLEGE-NORTHLINE LOCATION COURSE SYLLABUS FALL 2011 COMPUTER APPLICATION I POFI 1301

Entity-Relationship Diagrams

Relational Model Introduction

Databases. Web applications in PHP to query a database. Practice n. 4

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

Data Management Lecture Outline 2 Part 2. Instructor: Trevor Nadeau

LECTURE 3: ENTITY-RELATIONSHIP MODELING

Sahaj Computer Solutions. Data Modeling using the Entity Relationship Model

Database Applications (15-415)

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

Introduction to Data Management. Lecture #5 Relational Model (Cont.) & E-Rà Relational Mapping

Conceptual Data Modeling

The appendix contains information about the Classic Models database. Place your answers on the examination paper and any additional paper used.

From theory to practice. Designing Tables for an Oracle Database System. Sqlplus. Sqlplus. Technicalities. Add the following to your.

Database Systems ( 資料庫系統 ) Practicum in Database Systems ( 資料庫系統實驗 ) 9/20 & 9/21, 2006 Lecture #1

Database Systems ( 資料庫系統 )

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

Downloaded from

Transcription:

Homework 2 1. An international school of technology has hired you to create a database management system to assist in scheduling classes. After several interviews with the president, you have come up with the following list of entities, attributes, and initial business rules: Room is identified by Building ID and Room No and also has a Capacity. A room can be either a lab or a classroom. If it is a classroom, it has an additional attribute called Board Type. Media is identified by MType ID and has attributes of Media Type and Type Description. Note: Here we are tracking type of media (such as a VCR, projector, etc.), not the individual piece of equipment. Tracking of equipment is outside the scope of this project. Computer is identified by CType ID and has attributes Computer Type, Type Description, Disk Capacity, and Processor Speed. Please note: As with Media Type, we are tracking only the type of computer, not an individual computer. You can think of this as a class of computers (e.g., PIII 900MHZ). Instructor has identifier Emp ID and has attributes Name, Rank, and Office Phone. Timeslot has identifier TSIS and has attributes Day Of Week, Start Time, and End Time. Course has identifier Course ID and has attributes Course Description and Credits. Courses can have one, none, or many prerequisites. Courses also have one or more sections. Section has identifier Section ID and attribute Enrollment Limit. After some further discussions, you have come up with some additional requirements to help you create the initial design: An instructor teaches one, none, or many sections of a course in a given semester. An instructor specifies preferred time slots. Scheduling data are kept for each semester, uniquely identified by semester and year. A room can be scheduled for one section or no section during one time slot in a given semester of a given year. However, one room can participate in many schedules, one schedule, or no schedules; one time slot can participate in many schedules, one schedule, or no schedules; one section can participate in many schedules, one schedule, or no schedules. A room can have one type of media, several types of media, or no media. Instructors are trained to use one, none, or many types of media. A lab has one or more computer types. However, a classroom does not have any computers. A room cannot be both a classroom and a lab. There also are no other room types to be incorporated into the system. Develop an EER model for the following situation using the EER diagram,

2. The following figure shows an ER schema for a university database. a) Map this schema into a relational schema b)show the SQL statements needed to create the relations, using proper constraints. If your translation cannot capture any constraints in the ER diagram, explain why.

3. Map the following EER diagram into a relational schema, show the SQL statements needed to create the relations, using proper constraints. If your translation cannot capture any constraints in the ER diagram, explain why.

CREATE TABLE Model ( model_no INTEGER primary key, capacity INTEGER, weight INTEGER ) CREATE TABLE Plane ( reg_no INTEGER primary key, model_no INTEGER NOT NULL, FOREIGN KEY (model_no) REFERENCES Model(model_no) ON DELETE RESTRICT

) CREATE TABLE Test ( FAA_no INTEGER primary key, name VARCHAR(20), max_possible_score INTEGER, ssn INTEGER NOT NULL, reg_no INTEGER NOT NULL, date DATE, hours INTEGER, score INTEGER, FOREIGN KEY (ssn) REFERENCES Technician(ssn) ON DELETE RESTRICT, FOREIGN KEY (reg_no) REFERENCES Plane(reg_no) ON DELETE RESTRICT ) CREATE TABLE Employees( ssn INTEGER primary key, union_mem_no INTEGER ) CREATE TABLE Technician( ssn INTEGER primary key, name VARCHAR(20), salary INTEGER, address VARCHAR(100), phone_no INTEGER, FOREIGN KEY (ssn) REFERENCES Employees(ssn) )

CREATE TABLE Traffic_control( ssn INTEGER primary key, exam_date DATE, FOREIGN KEY (ssn) REFERENCES Employees(ssn) ) CREATE TABLE Expert( ssn INTEGER, model_no INTEGER, PRIMARY KEY(ssn, model_no), FOREIGN KEY (ssn) REFERENCES Technician(ssn), FOREIGN KEY (model_no) REFERENCES Model(model_no), )