Ch 05. Basic Symbols ( manino ). Cardinalities Cardinality Notation.

Slides:



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

E NTITY R ELATIONSHIP D IAGRAMS Joe Meehean 1. E NTITY R ELATIONSHIP M ODEL Entity type an object (noun) e.g., student attributes (e.g., last name) Relationship.
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.
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.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 3 The Entity- Relationship Model.
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.
Entity Relationship Diagrams
Data Modeling Entity - Relationship Models. Models Used to represent unstructured problems A model is a representation of reality Logical models  show.
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 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
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.
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.
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.
Concepts and Terminology Introduction to Database.
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.
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.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
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.
Entity Relationship Modeling
Database Design – Lecture 4 Conceptual Data Modeling.
Database Systems: Design, Implementation, and Management Ninth Edition
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
The Entity-Relationship Model, P. I R. Nakatsu. Data Modeling A data model is the relatively simple representation, usually graphic, of the structure.
Chapter 5 Understanding Entity Relationship Diagrams.
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.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
Chapter 3: Modeling Data in the Organization
Database Design – Lecture 4
Quiz Questions Q.1 An entity set that does not have sufficient attributes to form a primary key is a (A) strong entity set. (B) weak entity set. (C) simple.
Figure Specialization Hierarchy
מודל הנתונים.
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 5 Advanced Data Modeling
Mapping an ERD to a Relational Database
Conceptual Data Modeling
Presentation transcript:

Ch 05. Basic Symbols ( manino )

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