Slide4 er-stu10. One-to-
Many Relationship)
Entity A
Entity B
Entity
Entity
19. EX
1
1, 2, 3, 4, 5 6
1
40
21. Regular Entity
Strong
Entity
Identity
------------------------------------------------
------------------------------------
Weak Entity
Parent
Entity
Parent Entity
23. Employee
EmpID Name Sex Saraly
001 M 8,500
002 M 9,000
Time_in_out
003 F 12,000
EmpID Date Time_in Time_o
ut
001 15/2/52 7.30 17.30
002 15/2/52 8.00 18.00
003 15/2/52 7.45 17.45
001 16/2/52 8.00 18.00
002 16/2/52 7.30 17.00
003 16/2/52 8.00 17.30
24. Student Subject
(Strong) (Strong)
45001 01
02
45002
Regis_Det
ail(Weak)
450 1/45 01
01
450 1/45 01
02
450 1/45 02
01
26. Composite
Composite Entity
Entity Entity
Entity
Many to Many
Key Attribute Composite Entity
M N
Key Attribute Entity
M:M 1:M
1 M M 1
31. ER
1:1 ( )
primary key : pk)
foreign key : fk)
32. ER
1:M
ER
Diagram
M
ER M
primary key: pk)
M
foreign key :
fk) M
34. ER
M:N
ER Diagram
M: N
35. ER
M:N ( )
ER Diagram
M:N
36. M:N
M 1:M N
ER
1:M
1 M M 1
37. E-R
Diagram
1.
2.
3.
4.
5.
38.
(Attribute)
Domain
39. RelationCardinality =
PERSONS
Name Addres Phone
s
Manee Phitsanulo 1111111
k Tuple
John Chaingmai 2222222
Peter Bangkok 3333333
Tata Tak 4444444
Degree = Attribute
40. Domain
Attribute
salary integer 8 digits
Data Type
Emp_name
Format chars
string 15
sex string M,F