Enhanced-ER Data Model



Similar documents
Chapter 8 The Enhanced Entity- Relationship (EER) Model

CSC 742 Database Management Systems

Exercise 1: Relational Model

Chapter 2: Entity-Relationship Model. Entity Sets. " Example: specific person, company, event, plant

Chapter 2: Entity-Relationship Model. E-R R Diagrams

IV. The (Extended) Entity-Relationship Model

Entity - Relationship Modelling

E D M O N T O N ADMINISTRATIVE PROCEDURE

Database Design Exercises

three Entity-Relationship Modeling chapter OVERVIEW CHAPTER

You will not accrue miles or points if the vendors do not have this information. Please contact each vendor to make any changes.

DECISION No 120/2014. on the implementing provisions for Regulations No 3/2014, No 4/2014 and No 5/2014 of the Committee of the Regions

Schneider Electric. Global Business. Travel Policy

Reimbursement of Travel and Lodging Expenses

CHAPTER 3: DATA MODELING USING THE ENTITY-RELATIONSHIP MODEL

*This information brochure has been issued pursuant to provisions of EC 261/2004 Regulation of the European Parliament and European Union Council.

2. Conceptual Modeling using the Entity-Relationship Model

Safar Flyer Corporate: even more generous with corporates!

Rational Software. Course Registration System Use-Case Model

CS 4604: Introduc0on to Database Management Systems. B. Aditya Prakash Lecture #5: En-ty/Rela-onal Models- - - Part 1

COMMISSION REGULATION. of

Completing a travel booking using Amadeus e-travel

The University of Kansas MS Degree in Information Technology

APPLICATION FORM FOREIGN STUDENTS (PLEASE PRINT)

ER modelling, Weak Entities, Class Hierarchies, Aggregation

CONDITIONS OF CONTRACT

SERVICE CERTIFICATION TRAINING PROGRAM

SERVICE CERTIFICATION TRAINING PROGRAM

MEMBERSHIP, ENTERING INTO AN AGREEMENT AND RESPONSIBILITIES OF THE COMPANY

The Entity-Relationship Model

User s Guide Online train ticket reservations

United States Agency for International Development Bureau for Management Office of Chief Information Officer E2 Travel Management Service User Guide

Class Diagrams. University. Exercises

Membership terms and conditions for BRA Vänner

Restructuring the Revenue Management System of North Star Airlines North Star Airlines is a medium-sized airline company serving eight major cities

Database Design. Database Design I: The Entity-Relationship Model. Entity Type (con t) Chapter 4. Entity: an object that is involved in the enterprise

The president and all other university officials are responsible for ensuring compliance with this travel policy in their respective areas.

CHAPTER 4. o Hotel Results 15 CHAPTER 5. o Car Results: Matrix & Options 19. o Ground and Limo Service 21. o Trip Purchasing & Booking 23

Completing your CTM Online - RESX Profile

Dealing with flight disruption

TS Channels and Alliances. Travel & Expense Reimbursement Policy. for. U.S. Based Partners

EXPENSE & TRAVEL REIMBURSEMENT

Database Management System Case Studies

TRAVEL POLICY FOR THE U.S. SCIENCE SUPPORT PROGRAM (USSSP) OFFICE

Travel & Accommodation Arrangements

Requirement Analysis & Conceptual Database Design. Problem analysis Entity Relationship notation Integrity constraints Generalization

LECTURE - 3 RESOURCE AND WORKFORCE SCHEDULING IN SERVICES

Before using the Online Booking Tool, ensure all travel preferences have been updated. See Getting Started for more information.

Data Integrity in Travel Management Reporting

BusBoss Professional Highlights Transportation Management Software

MANUAL FOR THE GRANT OF THE DORA PLUS SUB-ACTIVITY 1.2 STUDY MIGRATION OF DOCTORAL DEGREE STUDENTS

Student Transportation Policies and Procedures

FREQUENTLY ASKED QUESTIONS REGARDING CITY NATIONAL REWARDS, POWERED BY THE SCORECARD PROGRAM EFFECTIVE MAY 7, 2012

An infinite world of privileges

Physician Recruitment Budgetary Planning: Case Study (Example)

Cruising from Charleston

NIH POLICY MANUAL Travel Policies and Procedures

CIVIL AVIATION REQUIREMENTS SECTION 3 AIR TRANSPORT SERIES M PART IV ISSUE I, DATED 6 TH AUGUST, 2010 EFFECTIVE: No.

FAQ s for Travelers and Travel Arrangers

ATB Financial Travel & Entertainment Policy

LECTURE - 2 YIELD MANAGEMENT

EMERGENCY PURCHASES AND FLIGHT DELAY INSURANCE CERTIFICATE OF INSURANCE INTRODUCTION HOW TO OBTAIN ASSISTANCE

ANZ Airpoints Visa WELCOME GUIDE

GA Travel & Expense System. FAQ s

ER & EER to Relational Mapping. Chapter 9 1

GOVERNANCE POLICY. Expense Guidelines Policy and Procedure

Airlines Industry Yield Management. Ken Homa

INSTRUCTIONS GUIDE FOR BLUE AIR TICKETS ISSUANCE

Santa Monica College Administrative Regulation - Students Activities and Student Conduct

MALAYSIA AIRLINES & MAYBANK AMERICAN EXPRESS PLATINUM CHARGE CARD TRAVEL PROGRAM TERMS & CONDITIONS

Business travel made simple and rewarding. USER GUIDE

Concur Travel Reservation System

PURPOSE The mission of the Rotary International Travel Service (RITS) is to provide safe, cost-effective travel services to Rotary funded travelers.

Travel and Expense Management User Guide. Revised

INSTRUCTIONS GUIDE FOR BLUE AIR TICKETS ISSUANCE

Guide to online booking and having tickets issued

Regulation on doctoral studies at the Agricultural University of Iceland

POLICIES AND PROCEDURES ON GRADUATE EDUCATION SCHOOL OF HEALTH SCIENCES PURDUE UNIVERSITY

UN TRAVEL POLICY SUMMARY

ROYAL MALAYSIAN CUSTOMS GOODS AND SERVICES TAX GUIDE ON TRAVEL INDUSTRY

Axiom Frequently Asked Questions

Corporate Online Travel Solutions. by Thomas Cook (India) Ltd.

WELLESLEY COLLEGE TRAVEL POLICIES AND PROCEDURES

BEREA COLLEGE TRAVEL AND BUSINESS EXPENSE REIMBURSEMENT POLICY

Transmodel in UML. SITP 2 Système d'information Transport Public

American Express Online (AXO) Reference Guide For Saint Louis University

Travel Management System (TMS) FAQ s

Customer Service Plan. (Issued in Compliance with 14 CFR Part 259)

Traveler Help Desk Credit Card Authorization Form Fax completed form to (888)

Universal's SuperStar Shuttle

STANDARD ASSESSMENT REGULATIONS 2015/16 Approved June 2015

Taking care of people. Travel Care

Saudi Arabian Airlines Customer Service Plan

Department of Bioengineering

Orbit Online Booking Tool User Guide 2015

AIR PASSENGER RIGHTS EU COMPLAINT FORM

Transcription:

CS4710 Introduction to Database Systems Enhanced-ER Data Model Instructor: Yi-Shin Chen Office: EECS 3201 Email: yishin@cs.nthu.edu.tw Office Hour: Tu. 1-2PM, Th. 3-4pm Motivation ER data model is useful to describe traditional applications Newer types of applications were difficult to model, for example: Design and manufacturing (CAD/CAM) Geographic Information Systems (GIS) These applications had more complex requirements Semantic data modeling concepts needed to be incorporated Result Enhanced (or Extended) ER data model 2007/3/13 Introduction to Database Systems 2 1

EER Model Concepts Includes all modeling concepts of basic ER Additional concepts: subclasses/superclasses, specialization/generalization, categories, attribute inheritance It is used to model applications more completely and accurately if needed It includes some object-oriented concepts, such as inheritance 2007/3/13 Introduction to Database Systems 3 Key Ideas of EER Generalization Compute the union of two or more entity sets (or subclasses) Produce a higher-level entity set (or superclass) Containment relationship between the superclass and subclass(es) Specialization Construct the subclasses that are a subset of superclasses Reverse of generalization Example We focus on specialization afterward 2007/3/13 Introduction to Database Systems 4 2

Why Specialization The process allows us to Define a set of subclasses of an entity type Establish additional specific attributes with each subclass Establish additional specific relationship sets between each subclass and other entity sets 2007/3/13 Introduction to Database Systems 5 Subclass Subclass entities inherit attributes from the superclass An entity can be a member of a number of subclasses Sex Name ID Address DoB Person Employee Alumnus Student Salary Class Major An entity cannot just being a member of a subclass but not superclass It is not essential that every entity in a superclass be a member of some subclass 2007/3/13 Introduction to Database Systems 6 3

Different Types of Specialization Predicate-defined (or condition-defined) Determine subclass membership by examining the value of a specific attribute (termed defining attribute ) Sex Name ID Address DoB Employee Secretary Faculty Technician Typing Speed Research Interest Specialty User-defined The user specifies subclass membership individually 2007/3/13 Introduction to Database Systems 7 Different Types of Specialization Disjoint: an entity can be a member of at most one subclass Overlap: when the subclasses are not disjoint Total: each entity must be a member of some subclass Partial: An entity might belong to no subclass Disjointness and completeness constraints are independent Hence, four combinations are possible 2007/3/13 Introduction to Database Systems 8 4

Hierarchies vs. Lattices Hierarchy has a constraint that every subclass has only one superclass (called single inheritance) In a lattice, a subclass can be subclass of more than one superclass (called multiple inheritance) A subclass with more than one superclass is called a shared subclass In a lattice or hierarchy, a subclass inherits attributes not only of its direct superclass, but also of all its predecessor superclasses 2007/3/13 Introduction to Database Systems 9 Lattice Example 2007/3/13 Introduction to Database Systems 10 5

Categories (UNION TYPES) In some cases, need to model a single superclass/subclass relationship with more than one superclass Superclasses represent different entity types Such a subclass is called a category or UNION TYPE Example: Database for vehicle registration, vehicle owner can be a person, a bank (holding a lien on a vehicle) or a company. Category (subclass) OWNER is a subset of the union of the three superclasses COMPANY, BANK, and PERSON 2007/3/13 Introduction to Database Systems 11 Example of Categories 2007/3/13 Introduction to Database Systems 12 6

Category Member vs. Shared Subclass A category member must exist in at least one of its superclasses Note: The difference from shared subclass, which is subset of the intersection of its superclasses (shared subclass member must exist in all of its superclasses). 2007/3/13 Introduction to Database Systems 13 Example: Railway System Each line has a unique line code Lines may run via mountain or sea Each line is associated with origin, destination, intermediate stops, and all scheduled departure time, and scheduled arrival time Not every line runs every day Every time the line runs must be recorded. There are four types of trains: each has fixed cars TzeChiang, ChuKuang, TzeChiang: the fastest one ChuKuang: the second fastest FuHsing: the slowest one EMU: where customers can sit anywhere Tickets The types of tickets are classified into normal, half-fare, and platform tickets 2007/3/13 Introduction to Database Systems 14 7

Example: Railway System (Contd.) Information of normal and half-fare tickets includes The origin The destination Price The line he takes The date he takes Car number and seat number should also be recorded except for EMU If all seats were sold out, passengers will get tickets without seats If a customer bought a round trip ticket, he could get 10% discount Customers can book tickets by the Internet or by telephone One customer can book up to four tickets at one time Booking information includes Personal ID of the customer The date he booked the tickets The information of the tickets Booked tickets are only reserved for 5 days If a customer didn t pay for the booked tickets in time, the booking is invalid and the seats are released for other customers 2007/3/13 Introduction to Database Systems 15 Example: Reservation System Reservation System for airline companies Each company has many aircrafts Each has a registration number, make, model, and the maximum capacity of passengers Each company has many flights Flights can be classified into domestic or international routes Each flight departs from and arrives at registered airports An airport also has an airport code, description name, city and country Flight may stop at some intermediate stops Customers could take a transfer flight from intermediate stops Each flight has three seat classes First Class, Business Class, and Economy class For every flight, the system should store a list of available seats The seat arrangements are associated with aircrafts Each seat can only be reserved to one customer Ticket prices are associated with classes and time Customers can make reservation without reserving seats Each flight allow 20% overbooking 2007/3/13 Introduction to Database Systems 16 8

Example: Reservation System (Contd.) The reservation system should keep A unique identifier for each customer This identifier is assigned automatically once customers make a new reservation in the system Customer information Flight information The time that reservation was made A credit-card number associated with the reservation A flag which indicates whether this particular reservation is paid or not When a reservation is paid it is transformed automatically to a ticket The reservation can be canceled before flight departure, however the ticket is still valid (to exchange some products) Each reservation might be associated with many flights 2007/3/13 Introduction to Database Systems 17 Example: Registration-System For University System of Taiwan (UST) Each school has many departments Each department will offer many courses Some courses are specially designed for students majoring in some subjects Some courses will be offered regularly For some courses, there will be many classes in one semester taught by different instructors Some courses will have prerequisite subjects Some classes will control the number of seats The system should avoid time conflicts when students schedule their courses 2007/3/13 Introduction to Database Systems 18 9

Example: Registration-System (Cond.) Some courses are specially designed for graduate students Graduate students can become TAs of certain classes However, he/she has to take this course before A full-time student should enroll in at least 8-units/semester for graduate students 6-units/semester for graduate students who have TA/RAships 12-units/semester for undergraduate students The instructors of classes can be Faculty PhD students (who can only teach undergraduate-level classes) Students receiving RAships should work with some faculty 2007/3/13 Introduction to Database Systems 19 Example: Movie On Demand System The movie-on-demand (MoD) provider operates several video servers in different geographical locations that let customers view movies at home via a special set-top box that interfaces with their TV and that further connects to the video server network. The database must represent the following information: Video Movie Information A movie has a title, release date, rating, running time, director, and one or more actors Movies are split between domestic and foreign movies A foreign movie uses a language other than English and may provide English subtitles Domestic movies are further categorized into comedy, drama, action, and horror movies A comedy movie has the degree of funniness which ranges between 1 and 5 A drama movie has a short description such as love story, documentary, humanity, etc. 2007/3/13 Introduction to Database Systems 20 10

Example: Movie On Demand System (Con.) Each movie could be reviewed by one or more critics, each of whom evaluates it as between zero and five stars A critic has a name and a phone number He or she might review one or more movies A movie may have won one or more academy awards (i.e., Oscars ) If that is the case, then the movie has a list of all the categories in which it won E.g., best picture, best actor, best actress, etc. Each movie is stored on a number of different video servers Each video server has a unique ID and an address (location) If a customer requests a movie then that movie is delivered (streamed) from one of the video servers to the customer s home Each movie can be supplied by only one distributor One distributor might provide several movies For each distributor, the MoD provider keeps track of information about its name, address, and phone number A distributor s address can be accessed as street address, city, state, and zip code individually However, the entire address of a distributor can also be retrieved as a unit 2007/3/13 Introduction to Database Systems 21 Example: Movie On Demand System (Con.) Employee Information An employee has a name, a social security number, date of birth, salary, and a phone number He or she may have a supervisor Employees are either permanent or temporary, but not both Each permanent employee has an employee number All supervisors are permanent employees An employee works at the location of one of the video servers Customer Information A customer has a social security number, a name, a phone number, and an address Each customer must have one or more credit cards Each credit card includes a type of credit card (Visa/MasterCard/ ), a card number, and an expiration date. Viewing Transaction Information Each customer can view movies from a video server For each viewing transaction, the viewing date and time is recorded. 2007/3/13 Introduction to Database Systems 22 11

Example: Movie On Demand System (Con.) Bill Statement Information Each customer receives one bill statement after each viewing transaction Each statement has a billing date, a billing number, one or more movie titles, and a total charge. A billing number is unique for a particular customer It is not unique across different customers Release Charge Information For each movie, a release type is defined Arbitrarily recent movies are marked as new release, whereas others are marked as ordinary release. The store keeps track of different charge information for different release types For newly released movies, the fee is $100 for the first viewing and $30 for each additional viewing For the other ones, the fee is $50 for the first viewing and $15 for each additional viewing 2007/3/13 Introduction to Database Systems 23 12