DATABASE SYSTEMS. Chapter 5 Entity Relationship (ER) Modelling DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT

Similar documents
Chapter 4. In this chapter, you will learn:

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 4 Entity Relationship (ER) Modeling

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

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 4 Entity Relationship (ER) Modeling

A l Ain University Of Science and Technology

A l Ain University Of Science and Technology

Chapter # 4 Entity Relationship (ER) Modeling

Relational Model (cont d) & Entity Relational Model. Lecture 2

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

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

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

LECTURE 3: ENTITY-RELATIONSHIP MODELING

Entity Relationship Modeling. From Rob and Coronel (2004), Database Systems: Design, Implementation, and Management

Entity Relationship Modelling

Represent entities and relations with diagrams

Data Analysis 1. Chapter 2.1 V3.1. Napier University Dr Gordon Russell

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

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

More on the Chen Notation

Database Systems. Overview - important points. Lecture 5. Some introductory information ERD diagrams Normalization Other stuff 08/03/2015

Entity Relationship (ER) Modeling

Lecture3: Data Modeling Using the Entity-Relationship Model.

Database Management System 6 ER Modeling...

Discussion Focus. Figure 1

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

Conceptual Database Design. COSC 304 Introduction to Database Systems. Entity-Relationship Modeling. Entity-Relationship Modeling

Agenda: Understanding Relationship Types Degree and Cardinality with Examples

The entity is an object of interest to the end user. entity correspond to the table not to a row- in the relational environment.

Multiple Choice Questions

IS 263 Database Concepts

course 3 Levels of Database Design CSCI 403 Database Management Mines Courses ERD Attributes Entities title 9/26/2018

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 8 Data Modeling Advanced Concepts

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

David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation

E-R Model. Hi! Here in this lecture we are going to discuss about the E-R Model.

Chapter 2 Conceptual Modeling. Objectives

Chapter 6. Advanced Data Modeling. Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel

Chapter 3 Database Modeling and Design II. Database Modeling

COSC 304 Introduction to Database Systems. Entity-Relationship Modeling

Related download: Instructor Manual for Modern Database Management 12th Edition by Hoffer Venkataraman Topi (Case studies included)

The Entity Relationship Model

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

Chapter 12. Entity-Relationship Modeling

System Analysis And Design Methods ENTITY RELATIONSHIP DIAGRAM (ERD) Prof. Ali Khaleghi Eng. Hadi Haedar

COMP102: Introduction to Databases, 9.1

Objectives Definition iti of terms Importance of data modeling Write good names and definitions for entities, relationships, and attributes Distinguis

Essentials of Database Management (Hoffer et al.) Chapter 2 Modeling Data in the Organization

How To Convert An Er Diagram Into Relational Schema Example

4. Entity Relationship Model

Entity Relationship Diagram (ERD): Basics

Conceptual Modeling in ER and UML

DATABASE SYSTEMS CHAPTER 2 DATA MODELS 1 DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT

Conceptual Database Design (ER modeling) Chapter Three

Lecture 09. Spring 2018 Borough of Manhattan Community College

ER DIAGRAM ER) diagram, a graphical representation of entities and their relationships to each other, typically used in computing in regard to the

Database Management System 5 ER Modeling

Intro to DB CHAPTER 6

CS 405G: Introduction to Database Systems

Advance Database Management System

Review -Chapter 4. Review -Chapter 5

Ali Khan < Project Name > Design Document. Version 1.0. Group Id: S1. Supervisor Name: Sir.

Data Modeling During System Analysis. Logical Data Model Stages. What is Conceptual Database Design? Gathering Information for Conceptual

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

Unified Modeling Language (UML)

Information Technology Audit & Cyber Security

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

Entity-Relationship Model. From Chapter 5, Kroenke book

ER-to-Relational Mapping

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

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

Full file at

System Analysis & design

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

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques. Fundamentals, Design, and Implementation, 9/e

Entity Relationship Modeling

Modern Systems Analysis and Design Seventh Edition

Data Modeling Using the Entity-Relationship (ER) Model

Institute of Southern Punjab, Multan

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 6 Normalization of Database Tables

Attributes. Entity-Relationship Model (ERM) IV. Entity Relationship Modeling. Entities and Attributes: Chen and Crow s Foot

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques. Fundamentals, Design, and Implementation, 9/e

CMP-3440 Database Systems

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

Database Management Systems LECTURE NOTES 2

Copyright 2016 Ramez Elmasr and Shamkant B. Navathei

MIS Database Systems Entity-Relationship Model.

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

Data Modeling Using the Entity- Relationship Model Design & Analysis of Database Systems

Entity-Relationship Model

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

Sahaj Computer Solutions. Data Modeling using the Entity Relationship Model

Conceptual Data Modeling

A good example of entities and relationships can be seen below.

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

Chapter : Analysis Modeling

Fundamentals of Design, Implementation, and Management Tenth Edition

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

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

Full file at Chapter 2: Foundation Concepts

Transcription:

DATABASE SYSTEMS DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT Chapter 5 Entity Relationship (ER) Modelling 1

Coronel & Crockett 978184480731) In this chapter, you will learn: The main characteristics of entity relationship components How relationships between entities are defined and refined and how those relationships are incorporated into the database design process How ERD components affect database design and implementation That real-world database design often requires the reconciliation of conflicting goals

Coronel & Crockett 978184480731) The Entity Relationship (ER) Model ER model forms the basis of an ER diagram ERD represents conceptual database as viewed by end user ERDs depict database s main components: Entities Attributes Relationships 3

Coronel & Crockett 978184480731) A Recipe ERD 4

Coronel & Crockett 978184480731) Entities Refers to entity set and not to single entity occurrence Corresponds to table and not to row in relational environment In UML notation, an entity is represented by a box that is subdivided into three parts. Entity name, a noun, is usually written in capital letters 5

Coronel & Crockett 978184480731) Attributes In the UML model, the attributes are written in the attribute box below the entity rectangle 6

Coronel & Crockett 978184480731) Domains Attributes have domain Domain is attribute s set of possible values Attributes may share a domain 7

Coronel & Crockett 978184480731) Identifiers (Primary Keys) Underlined in the ERD Key attributes are also underlined in frequently used table structure shorthand For example, a CAR entity may be represented by: CAR (CAR_REG, MOD_CODE, CAR_YEAR, CAR_COLOUR) 8

Coronel & Crockett 978184480731) Composite Primary Keys Primary keys ideally composed of only single attribute Possible to use a composite key Primary key composed of more than one attribute 9

Coronel & Crockett 978184480731) Composite Primary Keys (continued) 10

Coronel & Crockett 978184480731) Composite and Simple Attributes Composite attribute can be subdivided Simple attribute cannot be subdivided 11

Coronel & Crockett 978184480731) Single and Multi-Valued Attributes Single-value attribute can have only a single value Multi-valued attributes can have many values 1

Coronel & Crockett 978184480731) Multivalued Attributes (continued) 13

Coronel & Crockett 978184480731) Resolving Multivalued Attribute Problems Although conceptual model can handle M:N relationships and multi-valued attributes, you should not implement them in relational DBMS Within original entity, create several new attributes, one for each of the original multi-valued attribute s components Can lead to major structural problems in table Create new entity composed of original multivalued attribute s components 14

Coronel & Crockett 978184480731) Resolving Multivalued Attribute Problems (continued) 15

Coronel & Crockett 978184480731) Resolving Multivalued Attribute Problems (continued) 16

Coronel & Crockett 978184480731) Resolving Multivalued Attribute Problems (continued) 17

Coronel & Crockett 978184480731) Derived Attributes Attribute whose value may be calculated (derived) from other attributes Need not be physically stored within database Can be derived by using an algorithm 18

Coronel & Crockett 978184480731) Derived Attributes (continued) 19

Coronel & Crockett 978184480731) Derived Attributes (continued) 0

Coronel & Crockett 978184480731) Relationships Association between entities Participants are entities that participate in a relationship Relationships between entities always operate in both directions Relationship can be classified as 1:* Relationship classification is difficult to establish if know only one side of the relationship 1

Coronel & Crockett 978184480731) Multiplicity Multiplicity refers to the number of instances of one entity that are associated with one instance of a related entity. Cardinality expresses minimum and maximum number of entity occurrences associated with one occurrence of related entity Participation - determines whether all occurrences of an entity participate in the relationship or not.

Coronel & Crockett 978184480731) Multiplicity(continued) 3

Coronel & Crockett 978184480731) Existence Dependence Existence dependence Exist in database only when it is associated with another related entity occurrence Existence independence Entity can exist apart from one or more related entities Sometimes refers to such an entity as strong or regular entity 4

Coronel & Crockett 978184480731) Relationship Strength Weak (non-identifying) relationships Exists if PK of related entity does not contain PK component of parent entity Strong (Identifying) Relationships Exists when PK of related entity contains PK component of parent entity 5

Coronel & Crockett 978184480731) Weak (Non-Identifying) Relationships 6

Coronel & Crockett 978184480731) Weak (Non-Identifying) Relationships (continued) 7

Coronel & Crockett 978184480731) Weak (Non-Identifying) Relationships (continued) 8

Coronel & Crockett 978184480731) Strong (Identifying) Relationships 9

Coronel & Crockett 978184480731) Weak Entities Weak entity meets two conditions Existence-dependent Cannot exist without entity with which it has a relationship Has primary key that is partially or totally derived from parent entity in relationship Database designer usually determines whether an entity can be described as weak based on business rules 30

Coronel & Crockett 978184480731) Weak Entities (continued) 31

Coronel & Crockett 978184480731) Weak Entities (continued) 3

Coronel & Crockett 978184480731) Relationship Participation Optional participation One entity occurrence does not require corresponding entity occurrence in particular relationship Mandatory participation One entity occurrence requires corresponding entity occurrence in particular relationship 33

Coronel & Crockett 978184480731) Relationship Participation (continued) 34

Coronel & Crockett 978184480731) Relationship Participation (continued) 35

Coronel & Crockett 978184480731) Relationship Participation (continued) 36

Coronel & Crockett 978184480731) Relationship Participation (continued) 37

Coronel & Crockett 978184480731) Relationship Degree Indicates number of entities or participants associated with a relationship Unary relationship Association is maintained within single entity Binary relationship Two entities are associated Ternary relationship Three entities are associated 38

Coronel & Crockett 978184480731) Relationship Degree (continued) 39

Coronel & Crockett 978184480731) Relationship Degree (continued) 40

Coronel & Crockett 978184480731) Relationship Degree (continued) 41

Coronel & Crockett 978184480731) Recursive Relationships Relationship can exist between occurrences of the same entity set Naturally found within unary relationship 4

Coronel & Crockett 978184480731) Recursive Relationships (continued) 43

Coronel & Crockett 978184480731) Recursive Relationships (continued) 44

Coronel & Crockett 978184480731) Recursive Relationships (continued) 45

Coronel & Crockett 978184480731) Recursive Relationships (continued) 46

Coronel & Crockett 978184480731) Recursive Relationships (continued) 47

Coronel & Crockett 978184480731) Recursive Relationships (continued) 48

Coronel & Crockett 978184480731) Composite Entities Also known as bridge entities Composed of primary keys of each of the entities to be connected May also contain additional attributes that play no role in connective process 49

Coronel & Crockett 978184480731) Composite Entities (continued) 50

Coronel & Crockett 978184480731) Composite Entities (continued) 51

Coronel & Crockett 978184480731) Composite Entities (continued) 5

Coronel & Crockett 978184480731) Association Class 53

Coronel & Crockett 978184480731) Developing an ER Diagram Database design is iterative rather than linear or sequential process Iterative process Based on repetition of processes and procedures 54

Coronel & Crockett 978184480731) Developing an ER Diagram (continued) Building an ERD usually involves the following activities: Create detailed narrative of organization s description of operations Identify business rules based on description of operations Identify main entities and relationships from business rules Develop initial ERD Identify attributes and primary keys that adequately describe entities Revise and review ERD 55

Coronel & Crockett 978184480731) Developing an ER Diagram (continued) Tiny University Tiny University is divided into several schools Each school is composed of several departments Each department may offer courses Each department may have many lecturers assigned to it Each lecturer may teach up to four classes; each class is section of course Student may enroll in several classes, but (s)he takes each class only once during any given enrollment period 56

Coronel & Crockett 978184480731) Developing an ER Diagram (continued) Tiny University (continued) Each department has several students Each student has only a single major and is associated with a single department Each student has an advisor in his or her department Each advisor counsels several students The relationship between class is taught in a room and the room in the building 57

Coronel & Crockett 978184480731) Developing an ER Diagram (continued) 58

Coronel & Crockett 978184480731) Developing an ER Diagram (continued) 59

Coronel & Crockett 978184480731) Developing an ER Diagram (continued) 60

Coronel & Crockett 978184480731) Developing an ER Diagram (continued) 61

Coronel & Crockett 978184480731) Developing an ER Diagram (continued) 6

Coronel & Crockett 978184480731) Developing an ER Diagram (continued) 63

Coronel & Crockett 978184480731) Developing an ER Diagram (continued) 64

Coronel & Crockett 978184480731) Developing an ER Diagram (continued) 65

Coronel & Crockett 978184480731) Developing an ER Diagram (continued) 66

Coronel & Crockett 978184480731) Developing an ER Diagram (continued) 67

Coronel & Crockett 978184480731) Developing an ER Diagram (continued) 68

Coronel & Crockett 978184480731) Database Design Challenges: Conflicting Goals Database design must conform to design standards High processing speeds are often a top priority in database design Quest for timely information might be focus of database design 69

Coronel & Crockett 978184480731) Database Design Challenges: Conflicting Goals (cont.) 70

Coronel & Crockett 978184480731) Database Design Challenges: Conflicting Goals (cont.) 71

Coronel & Crockett 978184480731) Summary Entity relationship (ER) model Uses ERD to represent conceptual database as viewed by end user ERM s main components: Entities Relationships Attributes Includes multiplicity notation. 7

Coronel & Crockett 978184480731) Summary (continued) Multiplicities are based on business rules In ERM, *:* relationship is valid at conceptual level ERDs may be based on many different ERMs Database designers are often forced to make design compromises 73