Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model
Slide 2 Contents A. Sales Order Problem B. Solution
Slide 3 A. Sales Order Problem A company want to computerize all data. The followings are reports:
Slide 4 Let’s design DB diagram for above requirements
Slide 5 B. Solution 1.Logical Analysis 2.Physical Analysis
Slide 6 1. Logical Analysis 1.1. First solution 1.2. Second solution 1.3. Identify Recursive Relationship
Slide First solution Identify Entity Identify Attribute Identify Weak Entity Identify Primary Identifier Identify Alternative Identifier Identify Mandatory Attribute Identify Relationship
Slide Identify Entity
Slide Identify Attribute
Slide Identify Weak Entity What is Weak Entity? Design using ID-Dependent Entity
Slide What is Weak Entity? A weak entity is an entity whose existence depends upon another entity. All ID-Dependent entities are considered weak. An ID-dependent entity is an entity whose identifier includes the identifier of another entity. But there are also non-ID-dependent weak entities. The identifier of the parent does not appear in the identifier of the weak child entity.
Slide Design using ID-Dependent Entity
Slide Identify Primary Identifier
Slide Identify Alternative Identifier
Slide Identify Mandatory Attribute
Slide Identify Relationship Identify Maximum Cardinality Identify Minimum Cardinality
Slide Identify Maximum Cardinality
Slide Identify Minimum Cardinality
Slide Second solution Identify Entity Identify Attribute Identify Primary Identifier Identify Alternative Identifier Identify Mandatory Attribute Identify Relationship
Slide Identify Entity
Slide Identify Attribute
Slide Identify Primary Identifier
Slide Identify Alternative Identifier
Slide Identify Mandatory Attribute
Slide Identify Relationship Identify Maximum Cardinality Identify Minimum Cardinality
Slide Maximum Cardinality on Diagram
Slide Minimum Cardinality on Diagram
Slide Identify Recursive Relationship What is Recursive Relationship? Recursive Relationship on Diagram
Slide What is Recursive Relationship? A recursive relationship occurs when an entity has a relationship to itself. There are three types of Recursive Relationships: 1: 1 1:N N:M
Slide Recursive Relationship on Diagram
Slide Physical Diagram
Slide 32