Database Technology. Topic 4: Enhanced Entity- Relationship (EER) Modeling

Similar documents
Topic 5: Mapping of EER Diagrams to Relations

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

Relational DB Design by ER- and EER-to-Relational Mapping Design & Analysis of Database Systems

COIS Databases

Chapter 4. Enhanced Entity- Relationship Modeling. Enhanced-ER (EER) Model Concepts. Subclasses and Superclasses (1)

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

Chapter 7 Relational Database Design by ER- and EERR-to-Relational Mapping

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

Outline. Note 1. CSIE30600 Database Systems ER/EER to Relational Mapping 2

LELCTURE 4: ENHANCED ENTITY-RELATIONSHIP MODELING (EER)

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Entity Relationship Data Model. Slides by: Shree Jaswal

Chapter (4) Enhanced Entity-Relationship and Object Modeling

Database Management

DATABASE DESIGN I - 1DL300

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

Entity-Relationship Model

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

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4-1

ER to Relational Mapping

CMP-3440 Database Systems

DATABASE DESIGN I - 1DL300

Enhanced Entity-Relationship (EER) Modeling

DATABASDESIGN FÖR INGENJÖRER F

DATA MODELING USING THE ENTITY-RELATIONSHIP MODEL. 1 Powered by POeT Solvers Limited

Chapter 2: Entity-Relationship Model

Enhanced Entity- Relationship Models (EER)

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

DATABASTEKNIK - 1DL116

CS 338 The Enhanced Entity-Relationship (EER) Model

Introduction to Data Management. Lecture #3 (Conceptual DB Design) Instructor: Chen Li

Conceptual Data Modeling and the Entity- Relationship Model. Department of Computer Science Northern Illinois University September 2014

Conceptual Data Models for Database Design


Data Modeling Using the Entity-Relationship (ER) Model

Non-overlappingoverlapping. Final outcome of the worked example On pages R&C pages R&C page 157 Fig 3.52

Advance Database Management System

THE ENHANCED ER (EER) MODEL CHAPTER 8 (6/E) CHAPTER 4 (5/E)

MIT Database Management Systems Lesson 03: Entity Relationship Diagrams

Overview of Database Design Process Example Database Application (COMPANY) ER Model Concepts

Chapter 8 The Enhanced Entity- Relationship (EER) Model

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

MIS Database Systems Entity-Relationship Model.

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

High Level Database Models

The Entity-Relationship Model. The Entity-Relationship model. The ER model. The Entity-Relationship model. E-R Model Constructs. E-R Model Constructs

Data Modeling with the Entity Relationship Model. CS157A Chris Pollett Sept. 7, 2005.

Chapter Outline. Note 1. Overview of Database Design Process Example Database Application (COMPANY) ER Model Concepts

ER-to-Relational Mapping

Translation ER/EER to relational

Chapter 9 Outline. Relational Database Design by ER and EERto-Relational. Mapping Fundamentals of Database Systems

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

Unit 2 - Data Modeling. Pratian Technologies (India) Pvt. Ltd.

Conceptual Database Design (ER modeling) Chapter Three

Chapter 8: Enhanced ER Model

Intro to DB CHAPTER 6

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

Overview of db design Requirement analysis Data to be stored Applications to be built Operations (most frequent) subject to performance requirement

Multiple Choice Questions

Copyright 2016 Ramez Elmasr and Shamkant B. Navathei

CS3200 Database Design Spring 2018 Derbinsky. Entity-Relationship (ER) Diagrams. Lecture 7

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 7 Data Modeling with Entity Relationship Diagrams

Overview of Database Design Process. Data Modeling Using the Entity- Relationship (ER) Model. Two main activities:

Chapter 6: Entity-Relationship Model

Module 2 : Entity-Relationship Model 15

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Chapter 2 ENTITY RELATIONSHIP MODEL

Notes. These slides are based on a slide set provided by Prof. M. Tamer Öszu. CS 640 E-R Model Winter / 23. Notes

Objectives of logical design... Transforming the ERD diagram into relations. Relational database components. Mapping a composite attribute

Lecture3: Data Modeling Using the Entity-Relationship Model.

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

DATABASE DESIGN PROCESS

ER modeling. Lecture 4

Chapter 7: Entity-Relationship Model

Database Systems ER Model. A.R. Hurson 323 CS Building

Chapter 6: Entity-Relationship Model

The Entity-Relationship Model. Steps in Database Design

Chapter 6: Entity-Relationship Model

Chapter 7: Entity-Relationship Model

Conceptual Data Modeling

MTAT Introduction to Databases

The Entity-Relationship Model. Overview of Database Design. ER Model Basics. (Ramakrishnan&Gehrke, Chapter 2)

Chapter 7: Entity-Relationship Model

Introduction to Database Design

Entity-Relationship Model. From Chapter 5, Kroenke book

King Fahd University of Petroleum and Minerals

Chapter 3 The Enhanced E-R Model

Roadmap of This Lecture. Weak Entity Sets Extended E-R Features Reduction to Relation Schemas Database Design UML*

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

Chapter 7: Entity-Relationship Model

The Entity-Relationship Model

Chapter 4 Entity Relationship Modeling In this chapter, you will learn:

Unified Modeling Language (UML)

Introduction to Data Management. Lecture #3 (Conceptual DB Design)

Conceptual Database Design

COSC 304 Introduction to Database Systems Enhanced Entity-Relationship (EER) Modeling

The Entity-Relationship Model

COMP 244. ER-Diagram Notations. Entity-Relationship Diagrams DATABASE CONCEPTS & APPLICATIONS. Database Concepts & Applications 1.

The DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data.

Database Applications (15-415)

Transcription:

Topic 4: Enhanced Entity- Relationship (EER) Modeling Olaf Hartig olaf.hartig@liu.se

Example A taxi company needs to model their activities. There are two types of employees in the company: drivers and operators. For drivers it is interesting to know the date of issue and type of the driving license, and the date of issue of the taxi driver s certificate. For all employees it is interesting to know their personal number, address and the available phone numbers. The company owns a number of cars. For each car there is a need to know its type, year of manufacturing, number of places in the car and date of the last service. The company wants to have a record of car trips. A taxi may be picked on a street or ordered through an operator who assigns the order to a certain driver and a car. Departure and destination addresses together with times should also be recorded. 2

Recall: DB Design Process 3

Entity-Relationship (ER) Model High-level conceptual data model An overview of the database Easy to discuss with non-database experts Easy to translate to data model of DBMS ER diagram Diagrammatic notation associated with the ER model 4

Entities and Entity Types Entity: a thing in the real world with an independent existence Attributes: Properties that describe an entity Entity type: A collection of entities that have the same set of attributes SS ame Regumber Model Year Owner Car 5

Attributes simple versus composite single-valued versus multivalued stored versus derived Street City SS ame Address Owner Phoneumber Age 6

Constraints on Attributes Value sets (domains) of attributes Key attributes Street City SS ame Address Owner Phoneumber Age 7

Relationship Types Relationship type: Association among entity types Model SS ame Regumber Year Owner 1 owns Car 8

Constraints on Relationship Types Cardinality ratio: Maximum number of relationships an entity can participate in Possible cardinality ratio: 1:1, 1:, :1, and :M Owner 1 owns Car Owner 1 owns Car Owner owns M Car 9

Constraints on Relationship Types Participation constraint Total participation: Every entity participates in at least one relationship with another entity SS Every car must be owned by at least one owner. M Owner owns Car Regumber 10

Attributes of Relationship Types Store information on who owned which car and during which period of time SS ame Owner SellDate BuyDate owns Regumber M Car Model Year 11

n-ary Relationships Example: A person works as an engineer at one company and as a gym instructor at another company Company works at M Employee works as M JobType Employee M works as K Company JobType Ternary 12

Weak Entity Types Identified by their relationship to a specific entity from another entity type Do not have key attributes of their own Only partial key The identifying entity has the rest of the key name name Team 1 plays_in Player number 13

ER otation 14

Enhanced Entity-Relationship (EER) Model

Enhanced ER (EER) Model Why more? To support more complex data requirements Example: Only some employees can use a company car, only managers have to write a monthly report, but all employees have assigned personal number, salary account and a place in the office. What more? Specialization / generalization Subtype / supertype Union subtypes Attribute and relationship inheritance 16

Subtype / Supertype Surname P ame Firstame specialization generalization Employee process of defining types Commission U d U U o Salesman Engineer Manager ProjectLeader 1 1 uses writes 1 Car MonthlyReport Regumber ReportID 17

Constraints on Subtypes Disjointness constraint Specifies that the subclasses of the specialization must be disjoint Otherwise overlapping Completeness constraint (or totalness constraint) Specifies that every superclass entity must be in a subclass Otherwise partial Disjointness and completeness are independent constraints i.e., four cases are possible disjoint and total disjoint and partial overlapping and total overlapping and partial 18

Example

Example A taxi company needs to model their activities. There are two types of employees in the company: drivers and operators. For drivers it is interesting to know the date of issue and type of the driving license, and the date of issue of the taxi driver s certificate. For all employees it is interesting to know their personal number, address and the available phone numbers. The company owns a number of cars. For each car there is a need to know its type, year of manufacturing, number of places in the car and date of the last service. The company wants to have a record of car trips. A taxi may be picked on a street or ordered through an operator who assigns the order to a certain driver and a car. Departure and destination addresses together with times should also be recorded. 22

Example Street Postumber Address Town P Employee Phone TaxiCertifDate Uo U DrivingLicenseDate Driver Operator DrivingLicenseType 1 1 drives assign DeparturePlace Destination DepTime DestTime ID Trip made_by Type Regumber 1 Car YearOfManuf ServiceDate Places 23

Example (cont'd) A driver may have many driving licenses (types) TaxiCertifDate DrivingLicenseDate DrivingLicenseType Driver Date Type Id TaxiCertifDate DrivingLicense Körkort belongsto 1 Driver TaxiCertifDate Type DrivingLicense belongsto M Driver Date 24

Summary

Summary Entity-relationship (ER) model: a graphical way to model the world Main concepts: Entity type Relationship type Attributes Different types of constraints Enhanced ER model 26