E-R Diagram (Entity Relationship Diagram) - PowerPoint PPT Presentation

About This Presentation
Title:

E-R Diagram (Entity Relationship Diagram)

Description:

Title: E-R Diagram (Entity Relationship Diagram) Author: lek Last modified by: lek Created Date: 12/11/2006 1:50:34 PM Document presentation format – PowerPoint PPT presentation

Number of Views:409
Avg rating:3.0/5.0
Slides: 38
Provided by: Lek83
Category:

less

Transcript and Presenter's Notes

Title: E-R Diagram (Entity Relationship Diagram)


1
E-R Diagram(Entity Relationship Diagram)
  • Boonrit kidngun

2
E-R Diagram
  • ??????????????????????????????????????????????????
    ???
  • ????????????????????????????? Conceptual
  • ??????????????????????????????????????????????????
    ??????????? Software ??????????????????????
    (?????????? Software)
  • ????????????????????????????????????????

3
????????????????? E-R Diagram ?????? Chen Model
  • Entity
  • ??????????????????????????????????????????????????
    ????????????????????
  • ????
  • ????? (???????, ???????, ???????,
    ????????,??????)
  • ??????? (???????, ?????, ???, ???????)
  • ????? (??????, ?????, ???????????,??????)
  • ????????? (???????, ????????????,
    ???????????,????,???)
  • ???????????????????????????????????????? Entity
    ?????????

???????
????????? Entity
4
  • ????????? ??? Entity ?? 2 ??????
  • 1 Regular Entity ???????????????????? Strong
    Entity
  • ???? Entity ????????????????????????? Entity
    ??????????????? ??????????????? Identity
    ????????????? ??????????? Entity ????
  • 2 Week Entity
  • ???? Entity ?????????????????????? Entity
    ???????????????

Customer
Order Detail
5
????????? 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
6
  • Attributes
  • ?????????????????????????? Entity
  • ???? Attributes ??? ??????? ??????????
  • ?????????????
  • ????-???????
  • ???
  • ?????????
  • ????????? Attributes ?????????????????
    ???????????? Attributes ??????????????
    ????????????????????? Entity ?????? ????

7
  • ???????? Attributes

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

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

10
  • ??????????? Attributes ???????? ?

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

12
  • ???????? Relationship

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

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

1
M
Car
15
????????? Relationship
  • 2. Meny-to-Many Relationship
  • ???????????????????????????????? 1 ?????? ?????
    Entity ?????????????????? ?????????????? Entity
    ??????????? ??????? 1 ??????

M
N
Account
16
  • Composite Entity
  • ???? Entity ?????????????????????????????????????
    ?? MM ??????? ??? 1M (???????? MM
    ???????????????????????????)
  • ???? Composite Entity ?????????? Entity
    ???????????????????? Key Property ??????? 2
    Entity ???? ??????????????? ?
  • ???? Key Property ??? Composite Entity ????? Key
    Property ??????? 2 Entity ??????????? (???? PK
    ??????????????? Super Key ????????)
  • ???????????? Composite Entity ???
    ????????????????????????????????????????????????

17
???????????????????????? MM ?????? 1M
18
?????????????????????? E-R Model
  • 1. ?????????????????????????????????????????
  • ?????????????????????
  • ?????????????????????
  • ???????????????
  • ?????????????????

19
  • 2. ????? Entity ???????????????????????
  • ??????????????????????????????????????????????????
    ? ?????????????????????????? Entity
  • ??????????????????? ? ???????????? Entity
    ???????????? ?????????????????????????????????????
    ???????????????????
  • ??????????? Entity ?????????????? Entity
    ??????????????????????????????

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

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

22
  • 5. ???????? Primary Key ???????? Entity
  • ??????????????? Entity ????? Entity
    ??????????????????????????????????????????????????
  • ????????????????? Primary Key ???????

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

24
  • ????? Entity ???????????????????????
  • Entity Faculty ????????????????????
  • Entity Department ?????????????????????
  • Entity Teacher ????????????????????????
  • Entity Subject ?????????????????????

25
  • ???????????????????????? Entity

1
M
1
M
1
M
26
1
M
M
M
1
1
27
  • ????????????????? Entity
  • Faculty
  • Department

28
  • Teacher
  • Subject

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

30
(No Transcript)
31
?????????????????????????????? E-R Model
  • Ex ???????? ER-Diagram ???????????????????
    ????ABC ???????????
  • ??????
  • ????????????????????????????????????????????
  • ???????????????????????????????????????
  • ???????????????????????????????????????????????
  • ???????????????????????

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

33
  • ???????????????????????? Entity

??
1
M
Employee
Bill
??
1
M
TypeProduct
Product
34
??
M
M
Bill
Product
Bill_detail
M
1
1
M
Bill
Product
35
  • ????????????????? Entity

Emp_ID
Product_ID
Employee
Emp_name
Product
Product_name
salary
price
TypeProduct
TypeName
TypeID
36
Cus_ID
Bill_No
Customer
Cus_name
Bill
Bill_date
Address
Emp_ID
37
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