320 likes | 402 Views
Chapter 05 – Part 2. Data Modeling with the Entity-Relationship Model. Contents. A. Sales Order Problem B. Solution. A. Sales Order Problem. A company want to computerize all data. The followings are reports:. Let’s design DB diagram for above requirements. B. Solution.
E N D
Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model
Contents A. Sales Order Problem B. Solution
A. Sales Order Problem • A company want to computerize all data. The followings are reports:
B. Solution • Logical Analysis • Physical Analysis
1. Logical Analysis 1.1. First solution 1.2. Second solution 1.3. Identify Recursive Relationship
1.1. First solution 1.1.1. Identify Entity 1.1.2. Identify Attribute 1.1.3. Identify Weak Entity 1.1.4. Identify Primary Identifier 1.1.5. Identify Alternative Identifier 1.1.6. Identify Mandatory Attribute 1.1.7. Identify Relationship
1.1.3. Identify Weak Entity 1.1.3.1. What is Weak Entity? 1.1.3.2. Design using ID-Dependent Entity
1.1.3.1. 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.
1.1.7. Identify Relationship 1.1.7.1. Identify Maximum Cardinality 1.1.7.2. Identify Minimum Cardinality
1.2. Second solution 1.2.1. Identify Entity 1.2.2. Identify Attribute 1.2.3. Identify Primary Identifier 1.2.4. Identify Alternative Identifier 1.2.5. Identify Mandatory Attribute 1.2.6. Identify Relationship
1.2.6. Identify Relationship 1.2.6.1. Identify Maximum Cardinality 1.2.6.2. Identify Minimum Cardinality
1.3. Identify Recursive Relationship 1.3.1. What is Recursive Relationship? 1.3.2. Recursive Relationship on Diagram
1.3.1. 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