??????????????????????????????? E-R Model ????????????????????? - PowerPoint PPT Presentation

1 / 58
About This Presentation
Title:

??????????????????????????????? E-R Model ?????????????????????

Description:

Title: 1.1.1 – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 59
Provided by: Stou164
Category:

less

Transcript and Presenter's Notes

Title: ??????????????????????????????? E-R Model ?????????????????????


1
??????????????????????????????? E-R Model
?????????????????????
E-R Model Entity Relationship
Model ??????????????????????? ????????
ERD (Entity Relationship Diagram)
2
?????????? E-R Model
- ????????????????????????????????????????????????
????????????????????? - ??????????????????????????
????????
3
Entity Relationship Model (E-R Model)
  • ??? ?????????????????????????????????????????????
    ???????????????????????????
  • ??????????????????????????????????????????
    ?????????? 2 ????
  • ???????? (Entity)
  • ???????????? (Relationship) ??????? Entity

4
????????????????????????? E-R Diagram
5
????????????????????????? E-R Diagram
6
????????????????? E-R Diagram ?????? Chen Model
  • Entity
  • ??????????????????????????????????????????????????
    ????????????????????
  • ????
  • ????? (???????, ???????, ???????,
    ????????,??????)
  • ??????? (???????, ?????, ???, ???????)
  • ????? (??????, ?????, ???????????,??????)
  • ????????? (???????, ????????????,
    ???????????,????,???)
  • ???????????????????????????????????????? Entity
    ?????????

????????? Entity
???????
7
???????? (Entity)
  • ???????????????? ??????????????????????? ????
    ????? ????????? ???????
  • ????????????????????
  • ????????????????? (Property) ???????????????
    (Attribute) ??? ???? ????? ???? Attribute ????
    ??????? ???? ??? ???????????? ???

8
???????? (Entity)
  • ??????????? 3 ????
  • Regular Entity ??? Entity ???? ? ?? ?????
    Attribute ????????????????????????????????? Tuple
    ???
  • Weak Entity ???? Entity ?????? ??? Entity
    ???????????? Attribute ??? Entity
    ???????????????????????????????????????? Tuple
  • Composite Entity ??? Entity ????????? Attribute
    ??????? Primary key ??? 2 Entity
    ???????????????????????????? Tuple ???? Entity
    ??????????????????????????????????????? MM
    ??????? ??? 1M

9
Regular Entity
10
Weak Entity
11
????????? Strong Weak Entity
Student (Strong)
Subject (Strong)
???? ???? ???
45001 ???? ????????????
45002 ????? ?????
???????? ????????
01 ?????????
02 ?????????
Regis_Detail(Weak)
???? ?????????? ????????
45001 1/45 01
45002 1/45 01
45001 1/45 02
45002 1/45 02
12
Composite Entity
13
Attribute ???? Property
  • ???????????????? ? ??? Entity

Attribute
14
  • Attributes
  • ?????????????????????????? Entity
  • ???? Attributes ??? ??????? ??????????
  • ?????????????
  • ????-???????
  • ???
  • ?????????
  • ????????? Attributes ?????????????????
    ???????????? Attributes ??????????????
    ????????????????????? Entity ?????? ????

15
  • ???????? Attributes

Sex
Name
Employee
Emp_ID
Salary
16
Attributes
  • Attributes ?????????????????? 6 ??????
  • 1 Simple Attributes
  • Attributes????????????????????????????????? ????
    ???,?????????
  • 2 Composite Attributes
  • ????????????????????? Simple ?????????????????????
    ??????? ???? ???????? ???????????????????????
    Attributes ???? ??? ????
  • 3 Key Attributes
  • ???? Attributes ??????????????????????????????
    Entity ??????? (??????????????)
  • ????????? ER Diagram ?????????????? Attributes
    ??????? Key ????

17
Attributes
  • 4 Single - Valued Attributes
  • Property ????????????????????????????????????
    ???? Attributes ??? ??????????????? ??? ???? ????
    ???????? ??????????????????????????
  • ????????????????? ????????????????????????
  • 5 Multi - Valued Attributes
  • ????????????????????? Single ?????????????????????
    ???????????? ???? ????????????????????????????????
    ?????????????????????????
  • ????????????????????????
  • 6 Derived Attributes
  • ???? Property ??????????????????? ?????????????
    Property ???? ? ???? ?????????? ???????????
    Property ???????
  • ????????????????????????

18
????????? Attribute ???? Property
  • Simple Attribute

19
????????? Attribute ???? Property
  • Composite Attribute

20
????????? Attribute ???? Property
  • Key Attribute

21
????????? Attribute ???? Property
  • Single-Valued Attribute
  • ??? Attribute ??????????????? Attribute ????
    ??????????????????? ???? ?????????? ???????

22
  • ??????????? Attributes ???????? ?

Composite
Name
Surname
Sex
Name_Surname
Birthday
Derived
Student
ID
Age
key
Tel
Multi - Valued
23
???????????? (Relationship)
  • ??????? Entity ?????????????????????????? 2
    Entity ??????
  • ??????????????????????? Entity ????? Attributes
    ???????
  • ??????????????????????????????????????????????????
    ????????????? (Diamond) ??????????????????????????
    ??????? ?
  • ??????????????????????????????????????? Entity
    ???? ? ????

24
???????????? (Relationship)
  • ???????? Relationship

25
????????? Relationship
  • 1. One-to-One Relationship
  • ?????????????????????????????? Entity
    ?????????????????? ?????????????? Entity
    ??????????? ???????????????????????

1
1
Car
26
????????? Relationship
  • 2. One-to-Many Relationship
  • ?????????????????????????????? Entity
    ?????????????????? ?????????????? Entity
    ??????????? ??????? 1 ??????

1
M
Car
27
????????? Relationship
  • 3. Many-to-Many Relationship
  • ???????????????????????????????? 1 ?????? ?????
    Entity ?????????????????? ?????????????? Entity
    ??????????? ??????? 1 ??????

M
N
Account
28
Relationship ???? Connectivity ??? One to One ,
11
29
Relationship ???? Connectivity ??? One to Many,
1M
30
Relationship ???? Connectivity ??? Many to
Many, MN
31
?????????? E-R diagram ???? Table
  • Strong Entity

????? Student
32
?????????? E-R diagram ???? Table
  • Entity ????? Composite Attribute

????? Student
33
?????????? E-R diagram ???? Table
  • Entity ????? Multi-value Attribute

???????????? Tel ??? 1 ?????
????? Student
34
?????????? E-R diagram ???? Table
  • Weak Entity

????? Timestamp
35
?????????? E-R diagram ???? Table
?????????????????
  • ???????????????????????????? (One to One, 11)

??????
?????????? ?????????? ??????? ??????????

?????????? ?????????? ???????

??????
????
?????????? ??????????

??????
?????????? ?????????? ??????????

??????
36
?????????? E-R diagram ???? Table
?????????????????
  • ???????????????????????????? (One to Many, 1M)

??????
?????????? ?????????? ??????? ??????????

??????
?????????? ??????????

37
?????????? E-R diagram ???? Table
?????????????????
  • ???????????????????????????? (Many to Many, MN)

???????????? ?????????? ?????????

??????????
?????????? ?????????? ????

???????????? ??????????

??????????
??????
38
???????????????????????? MM ?????? 1M
39
?????????????????????? E-R Model
  • 1. ?????????????????????????????????????????
  • ?????????????????????
  • ?????????????????????
  • ???????????????
  • ?????????????????

40
  • 2. ????? Entity ???????????????????????
  • ??????????????????????????????????????????????????
    ? ?????????????????????????? Entity
  • ??????????????????? ? ???????????? Entity
    ???????????? ?????????????????????????????????????
    ???????????????????
  • ??????????? Entity ?????????????? Entity
    ??????????????????????????????

41
  • 3. ??????????????????????????? Entity
  • ???????? Entity ????????????????????????
    ??????????????????????????? ??????????????????????
    ????????
  • One to One Relationship
  • One to Many Relationship
  • Many to Many Relationship

42
  • 4. ???????????????????? Entity
  • ????????????????????? (Attributes) ?????? Entity
    ???????????????????? Attributes ?????
  • ??????????????????????? Attributes
    ???????????????
  • Composite Attributes
  • Derived Attributes

43
  • 5. ???????? Primary Key ???????? Entity
  • ??????????????? Entity ????? Entity
    ??????????????????????????????????????????????????
  • ????????????????? Primary Key ???????

44
?????????????????????????????? E-R Model
  • Ex
  • ??????????????????????????????????? 3 ??? ???
    ?????, ???????????, ???????????
  • ??????????????????????????????????????? ?
  • ??????????????????????????????????????? ? ??
  • ???????????????????????????? ?????????????????????
    ?????????????????
  • ?????????????????????????????????????????

45
  • ????? Entity ???????????????????????
  • Entity Faculty ????????????????????
  • Entity Department ?????????????????????
  • Entity Teacher ????????????????????????
  • Entity Subject ?????????????????????

46
  • ???????????????????????? Entity

1
M
1
M
1
M
47
1
M
M
M
1
1
48
  • ????????????????? Entity
  • Faculty
  • Department

49
  • Teacher
  • Subject

50
  • ???????? Primary Key ??? Entity
  • Entity Faculty ??? Faculty_ID
  • Entity Department ??? Dep_ID
  • Entity Teacher ??? Teacher_ID
  • Entity Subject ??? Subject_ID

51
(No Transcript)
52
?????????????????????????????? E-R Model
  • Ex ???????? ER-Diagram ???????????????????
    ????ABC ???????????
  • ??????
  • ????????????????????????????????????????????
  • ???????????????????????????????????????
  • ???????????????????????????????????????????????
  • ???????????????????????

53
  • ????? Entity ???????????????????????
  • Entity Customer ???????????????????????
  • Entity Employee ???????????????????????????
  • Entity Product ???????????????????????
  • Entity TypeProduct ???????????????????
  • Entity Bill ????????????????????????

54
  • ???????????????????????? Entity

??
1
M
Employee
Bill
??
1
M
TypeProduct
Product
55
??
M
M
Bill
Product
Bill_detail
M
1
1
M
Bill
Product
56
  • ????????????????? Entity

Emp_ID
Product_ID
Employee
Emp_name
Product
Product_name
salary
price
TypeProduct
TypeName
TypeID
57
Cus_ID
Bill_No
Customer
Cus_name
Bill
Bill_date
Address
Emp_ID
58
ER-Diagram ???????????????????
Product_ID
Product_name
Product_ID
Price_s
Detail_ID
Bill_No
price
Bill_detail
Bill_detail
1
1
M
M
Bill
Product
Bill_date
M
M
Amount
M
Emp_ID
??
Bill_No
??????
TypeName
1
??
TypeID
TypeProduct
1
1
Employee
Emp_name
salary
Emp_ID
Write a Comment
User Comments (0)
About PowerShow.com