Download presentation
Presentation is loading. Please wait.
1
Entity Relationship Modeling BUS112 Professor Kwan
2
2 Entity Relationship Diagram An Entity Relationship Diagram (ERD) is used to represent is used to represent the Entity Relationship Model of a Logical Schema (Logical View) of a Database. It describes in a very macro manner the Entities and Relationships involved in a system. The ERD has been adopted as the standard for documentation and communication in industry (but variations abound).
3
3 Entity Any distinguishing Object that is to be (or being) represented. “An Object about which we want to record data.” Usually has a Noun as its name. For example, an Employee. Entity Class - A Group of Entities with the same Attributes and are related to each other. For example, Employees.
4
4 Attribute A Characteristic of an Entity. Usually has an Adjective as its name. Its value must come from the Attribute’s Domain. Domain - described by Type, Size and the set of Possible and Valid values. Entity
5
5 Relationship Connections or mappings superimposed on the Entities. Could be within or among Entity Classes. Usually has a Verb as its name. Binary Relationships - Basic building blocks. 1 : 1 One to One 1 : M One to Many (Parent/Child) M : N Many to Many Entity Entity
6
6Relationship 1 : 1 One to One Entity A Entity B Entity A Entity B Entity A Entity B 1 : M One to Many M : N Many to Many to Many
7
7 The Cardinality of a Relationship Min 0 Max 1 Zero or One (Optional) (0,1) Min 1 Max 1 One and Only One (Mandatory) (1,1) Min 0 Max Many Zero or Many (Optional) (0,N) Min 1 Max Many One or Many (Mandatory) (1,N) Two Notations
8
8 Some Common Relationship Structures A B A Tree or Hierarchy Each Entity has only one Parent A 1 : M B
9
9 Some Common Relationship Structures AB C A Simple Network Entities can have more than one Parent A 1 : M C D B D
10
10 Some Common Relationship Structures A A Complex Network Entities can have more than one Parent A M : N B B
11
11 Some Common Relationship Structures A A Unary Relationship (1 : M or M : N) Entity is related to Itself A M : N Sometimes called a Recursive or the Bill-of-Material (BOM) Relationship.
12
12 Bank Database Schema Example
13
13 Inventory Database Schema Example
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.