Chapter 5 Understanding Entity Relationship Diagrams.

Slides:



Advertisements
Similar presentations
Group G10 Minh Anderson Thomas Hickerson. Q1: In the crow’s foot notation, entity types are denoted by boxes.
Advertisements

Advanced Data Modeling
Entity Relationship (ER) Modeling
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Systems Development Life Cycle
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 6 Advanced Data Modeling.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 5 Advanced Data Modeling.
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 6 Advanced Data Modelling
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 6 Advanced Data Modeling.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 6 Advanced Data Modeling.
Chapter 5 Understanding Entity Relationship Diagrams.
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
Mapping an ERD to a Relational Database To map an ERD to a relational database, five rules are defined to govern how tables are constructed. 1)Rule for.
ISMT221 Information Systems Analysis and Design Entity-Relationship Diagram Lab 4 Tony Tam.
System Analysis - Data Modeling
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 5 Understanding Entity Relationship Diagrams.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Developing Data Models for Business Databases.
Chapter Five Data Modeling with the Entity-Relationship Model.
Chapter 3: Modeling Data in the Organization
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
CS424 PK, FK, FD Normalization Primary and Foreign Keys Primary and foreign keys are the most basic components on which relational theory is based. Primary.
Chapter Five Data Modeling with the Entity-Relationship Model.
Chapter 6 Developing Data Models for Business Databases.
Chapter 3 © 2005 by Prentice Hall 1 Objectives Definition of terms Definition of terms Importance of data modeling Importance of data modeling Write good.
Class Agenda – 04/04/2006 Discuss database modeling issues
Ch5: ER Diagrams - Part 2 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
Chapter 7 Data Modeling with Entity Relationship Diagrams Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Entity Relationship Diagrams Objectives s Learn the Elements of the E-R model (entities, attributes, and relationships) s Show how to apply the E-R model.
Copyright (c) 2014 Pearson Education, Inc. Introduction to Databases.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 2/1 Copyright © 2004 Please……. No Food Or Drink in the class.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
5 Copyright © 2006, Oracle. All rights reserved. Understanding Entity Relationship Diagrams ( 實體關係圖 ) Part II.
Chapter 8 Data Modeling Advanced Concepts Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
5 Copyright © 2006, Oracle. All rights reserved. Understanding Entity Relationship Diagrams ( 實體關係圖 ) Part I.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Database Design, Application Development, and Administration, 5 th Edition Copyright © 2011 by Michael V. Mannino All rights reserved. Chapter 6 Developing.
IS 475/675 - Introduction to Database Design
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Chapter 4 Entity Relationship (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
Database Design – Lecture 5 Conceptual Data Modeling – adding attributes.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
1 A Demo of Logical Database Design. 2 Aim of the demo To develop an understanding of the logical view of data and the importance of the relational model.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 4 ENTITY RELATIONSHIP (ER) MODELING Instructor Ms. Arwa Binsaleh 1.
Database Design – Lecture 4 Conceptual Data Modeling.
Database Systems: Design, Implementation, and Management Ninth Edition
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 2: MODELING DATA.
Ch 05. Basic Symbols ( manino ). Cardinalities Cardinality Notation.
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
Database Design, Application Development, and Administration, 6 th Edition Copyright © 2015 by Michael V. Mannino. All rights reserved. Chapter 5 Understanding.
Data Modeling Advanced Concepts Updated 20/4/2015 TMC2034 Database Concept and Design1.
Lecture # 14 Chapter # 5 The Relational Data Model and Relational Database Constraints Database Systems.
Chapter 3: Modeling Data in the Organization
Database Design – Lecture 4
Developing Data Models – Conversion Rules
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 5 Advanced Data Modeling
Chapter 3: Modeling Data in the Organization
Chapter 4 Entity Relationship (ER) Modeling
Mapping an ERD to a Relational Database
Entity Relationship (ER) Modeling
Presentation transcript:

Chapter 5 Understanding Entity Relationship Diagrams

Outline Notation basics Understanding relationships Generalization hierarchies Diagram rules

Basic Symbols

Cardinalities

Cardinality Notation

Classification of Cardinalities Minimum cardinality based –Mandatory: existence dependent –Optional Maximum cardinality based –Functional –1-M –M-N –1-1

Summary of Cardinalities

More Relationship Examples

Comparison to Access Notation

Understanding Relationships Identification dependency M-N relationships with attributes Self identifying relationships M-way relationships Equivalence between M-N and 1-M relationships

Identification Dependency

M-N Relationships with Attributes

M-N Relationships with Attributes (II)

Instance Diagrams for Self- Referencing Relationships

ERD Notation for Self- Referencing Relationships

Associative Entity Types for M-way Relationships

Relationship Equivalence Replace M-N relationship –Associative entity type –Two identifying 1-M relationships M-N relationship versus associative entity type –Largely preference –Associative entity type is more flexible in some situations

Associative Entity Type Example

Generalization Hierarchies

Inheritance Subtypes inherit attributes of supertypes (direct and indirect) Allows abbreviation of attribute list Applies to code (methods) as well as attributes (data)

Generalization Constraints

Multiple Levels of Generalization

Comprehensive Example

Diagram Rules Ensure that ERD notation is correctly used Similar to syntax rules for a computer language Completeness rules: no missing specifications Consistency rules: no conflicts among specifications Supported by the ER Assistant

Completeness Rules Primary Key Rule: all entity types have a PK (direct, indirect, or inherited) Naming Rule: all entity types, relationships, and attributes have a name Cardinality Rule: cardinality is specified in both directions for each relationship Entity Participation Rule: all entity types participate in an at least one relationship except for entity types in a generalization hierarchy Generalization Hierarchy Participation Rule: at least one entity type in a generalization hierarchy participates in a relationship

Primary Key Rule Issue Primary key rule is simple in most cases For some weak entities, the PK rule is subtle –Weak entity with only one 1-M identifying relationship –Weak entity must have a local key to augment the borrowed PK from the parent entity type –Violation of PK rule if local key is missing

PK Rule Violation Example

Naming Consistency Rules Entity Name Rule: entity type names must be unique Attribute Name Rule: attribute names must be unique within each entity type and relationship Inherited Attribute Rule: attribute names in a subtype do not match inherited (direct or indirect) attribute names.

Connection Consistency Rules Relationship/Entity Connection Rule: relationships connect two entity types (not necessarily distinct) Relationship/Relationship Connection Rule: relationships are not connected to other relationships Redundant Foreign Key Rule: foreign keys are not used.

Identification Dependency Rules Weak entity rule: weak entities have at least one identifying relationship Identifying relationship rule: at least one participating entity type must be weak for each identifying relationship Identification dependency cardinality rule: the minimum and maximum cardinality must equal 1 for a weak entity in all identifying relationships

Example of Diagram Errors

Corrected ERD

Support in the ER Assistant Version 2 of the ER Assistant supports the diagram rules Relationship formation rules are supported by diagram construction Other rules are supported by the Check Diagram feature For the Redundant Foreign Key rule, the ER Assistant detects FKs that have the same name as the associated PKs

Summary Data modeling is an important skill Crow’s Foot ERD notation is widely used Use notation precisely Use the diagram rules to ensure structural consistency and completeness Understanding the ERD notation is a prerequisite to applying the notation on business problems