Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

32
Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model

description

Slide 3 A. Sales Order Problem  A company want to computerize all data. The followings are reports:

Transcript of Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Page 1: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 1

Chapter 05 – Part 2Data Modeling with the

Entity-Relationship Model

Page 2: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 2

ContentsA. Sales Order ProblemB. Solution

Page 3: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 3

A. Sales Order Problem A company want to computerize all data. The

followings are reports:

Page 4: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 4

Let’s design DB diagram for above requirements

Page 5: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 5

B. Solution1. Logical Analysis2. Physical Analysis

Page 6: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 6

1. Logical Analysis1.1. First solution1.2. Second solution1.3. Identify Recursive Relationship

Page 7: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 7

1.1. First solution1.1.1. Identify Entity1.1.2. Identify Attribute1.1.3. Identify Weak Entity1.1.4. Identify Primary Identifier1.1.5. Identify Alternative Identifier1.1.6. Identify Mandatory Attribute1.1.7. Identify Relationship

Page 8: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 8

1.1.1. Identify Entity

Page 9: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 9

1.1.2. Identify Attribute

Page 10: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 10

1.1.3. Identify Weak Entity1.1.3.1. What is Weak Entity?1.1.3.2. Design using ID-Dependent Entity

Page 11: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 11

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.

Page 12: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 12

1.1.3.2. Design using ID-Dependent Entity

Page 13: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 13

1.1.4. Identify Primary Identifier

Page 14: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 14

1.1.5. Identify Alternative Identifier

Page 15: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 15

1.1.6. Identify Mandatory Attribute

Page 16: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 16

1.1.7. Identify Relationship1.1.7.1. Identify Maximum Cardinality1.1.7.2. Identify Minimum Cardinality

Page 17: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 17

1.1.7.1. Identify Maximum Cardinality

Page 18: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 18

1.1.7.2. Identify Minimum Cardinality

Page 19: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 19

1.2. Second solution1.2.1. Identify Entity1.2.2. Identify Attribute1.2.3. Identify Primary Identifier1.2.4. Identify Alternative Identifier1.2.5. Identify Mandatory Attribute1.2.6. Identify Relationship

Page 20: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 20

1.2.1. Identify Entity

Page 21: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 21

1.2.2. Identify Attribute

Page 22: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 22

1.2.3. Identify Primary Identifier

Page 23: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 23

1.2.4. Identify Alternative Identifier

Page 24: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 24

1.2.5. Identify Mandatory Attribute

Page 25: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 25

1.2.6. Identify Relationship1.2.6.1. Identify Maximum Cardinality1.2.6.2. Identify Minimum Cardinality

Page 26: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 26

1.2.6.1 Maximum Cardinality on Diagram

Page 27: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 27

1.2.6.2. Minimum Cardinality on Diagram

Page 28: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 28

1.3. Identify Recursive Relationship

1.3.1. What is Recursive Relationship?1.3.2. Recursive Relationship on Diagram

Page 29: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 29

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

Page 30: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 30

1.3.2. Recursive Relationship on Diagram

Page 31: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 31

2. Physical Diagram

Page 32: Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.

Slide 32

?