2. F F F ˈ F F
F
F F
F
F F ˈ
F F F F F
F FF
K.Warawut Database Design 2
3. F F
(Entity)
F (Attribute)
F (Relationships)
K.Warawut Database Design 3
4. (Entity)
ˈ F F
F F F F F
F F F
F F F F
F F
(Customers) (Orders) (Products)
K.Warawut Database Design 4
5. F (Attribute)
ˈ F
F F F
F (Customers)
F
F
F F F( )
F
F
K.Warawut Database Design 5
6. F (Attribute)
F (Orders)
F F F F
F F F F
F F
F
F F
F
K.Warawut Database Design 6
7. F (Attribute)
F F (Products)
F F F
F F F F
F F F F
F F F
F
F F
F
K.Warawut Database Design 7
8. F (Relationships)
F (Customers) (Orders)
F F 1 N
F F F
F F F F F
F F
F F
F
F
K.Warawut Database Design 8
9. F F (Relational Database)
F (Customers) (Orders)
F F
1 N
F F
F F F F F
F F F F F
F F
F
F
F
K.Warawut Database Design 9
10. F F F
ʽ F (Field) / F (Attribute)
F F F
F (Record) / (Tuple)
ˈ ʽ F ʽ F
(Table) / (Relation)
ˈ F F
K.Warawut Database Design 10
11. F F F
Field
F F F F F
003 P&S STORE 1 F 159 21 ( ) .
015 Happy Shop 29 . F F
Record
181 The Book Shop Asia Hotel 296 .
213 P'S Line 2675 F9 F .95 .
008 The Bookseller 428 Rama I Road, Siam Square Bangkok.
K.Warawut Database Design 11
12. F (Relationships)
F F (One-to-One Relationships)
F F F (One-to-Many
Relationships)
F F F F (Many-to-Many
Relationships)
K.Warawut Database Design 12
14. F
F F F F F ( )
1:1 0005
0100
F
F
F 90 219.63
219.63
Yes
Yes
0125 SALES MANAGER FACTOMATIC 700.93 No
0051 SECRETS OF STARGATE 1,842.99 No
0010 US ATLAS 540.19 No
0007 VIDEO CONFERENCING CARD-FLY VIDEO OF SOUND 369.16 Yes
0008 F F Panasonic Model VHS F NV-VX3 260.00 Yes
0023 JAPANESE 1, LIYC 278.00 No
0055 JAPANESE 2, LIYC 278.00 No
1
F
F F F
0005 F F 90 400
0100 F 155
0125 SALES MANAGER FACTOMATIC 169
0051 SECRETS OF STARGATE 197
0010 US ATLAS 159
0007 VIDEO CONFERENCING CARD-FLY VIDEO OF SOUND 205
0008 F F Panasonic Model VHS F NV-VX3 177
K.Warawut 0023 JAPANESE 1, LIYC Design
Database 326 14
1 159
0055 JAPANESE 2, LIYC
17. F
1:N 003 F F F
P&S STORE
F
1
F
F 159 21 ( ) .
1 015 Happy Shop 29 . F F
181 The Book Shop Asia Hotel 296 .
213 P'S Line 2675 F9 F .95 .
008 The Bookseller 428 Rama I Road, Siam Square Bangkok.
F N
F F F F F F F F F (%)
10258 015 21/10/xx 28/10/xx 0005 8 25.00%
0100 8 0.00%
N
0125 15 0.00%
10265 181 21/10/xx 27/10/xx 0005 31 0.00%
0010 15 0.00%
10278 015 24/10/xx 3/11/xx 0007 16 0.00%
0008 31 25.00%
K.Warawut Database Design 17
0023 4 0.00%
20. F
N
F F F F F (%)
M:N N
10258 0005 8 25.00%
F 10258 0100 N 8 0.00%
N
F F F F F 10258 0125 15 0.00%
1 10258 015 21/10/xx 28/10/xx 10265 0005 31 0.00%
10265 181 21/10/xx 27/10/xx 10265 0010N 15 0.00%
10278 015 24/10/xx 3/11/xx 10278 0007 16 0.00%
10278 0008 31 25.00%
10278 0023 4 0.00%
F
F F F F F ( )
1 0005 F F 90 219.63 Yes 400
0100 F 219.63 Yes 155
0125 SALES MANAGER FACTOMATIC 700.93 No 169
0051 SECRETS OF STARGATE 1,842.99 No 197
0010 US ATLAS 540.19 No 159
0007 VIDEO CONFERENCING CARD-FLY VIDEO OF SOUND 369.16 Yes 205
0008 F F Panasonic Model VHS F NV-VX3 260.00 Yes 177
K.Warawut 0023 JAPANESE 1, LIYC Database Design 278.00 No 326
20
0055 JAPANESE 2, LIYC 278.00 No 159
21. F F F
Primary Key: PK ( F )
Candiate Key ( F F F )
Composite Key
Foreign Key: FK
K.Warawut Database Design 21
22. Primary Key: PK
ˈ ʽ F F F F F
F ʽ F ˈ Primary Key ˈ
F
K.Warawut Database Design 22
23. Candidate Key
ˈ ʽ F ʽ F F
ˈ Primary Key F F ˈ F
F ˈ F F F
F F F F ˈ F ˈ FF F
K.Warawut Database Design 23
24. Composite Key
ʽ F F F F F F
ʽ F ˈ Primary Key ʽ F F
F Composite Key
K.Warawut Database Design 24
25. Foreign Key
ˈ ʽ F ( ˆˉ Many)
F ʽ F ˈ Primary Key
( ˆˉ One) 2 F
One-to-Many F
K.Warawut Database Design 25
26. F
F F F F F (%)
N 10258 0005 8 25.00%
1
F 10258 0100 8 0.00%
F F F F F 10258 0125 15 0.00%
10258 015 21/10/xx 28/10/xx 10265 0005 31 0.00%
10265 181 21/10/xx 27/10/xx 10265 0010 15 0.00%
10278 015 24/10/xx 3/11/xx 10278 0007 16 0.00%
10278 0008 31 25.00%
Primary Key
10278 0023 4 0.00%
Foreign Key Composite Key
K.Warawut Database Design 26
27. F
ˈ F F
(Application Database)
F
F
K.Warawut Database Design 27
28. F F
F F F
ˈ FF
F F F F
F ( F F )
F F F F F
F
F F F
K.Warawut Database Design 28
29. F
1. F
2. F F F
3. F F F
4. F F F
Normalization
K.Warawut Database Design 29
30. Normalization
ˈ F F F F
F F ˈ F
F Normalization
F F F F F F F
F F F
FF
F F F F
F F F F
K.Warawut Database Design 30
31. F F
Normalization Normalization
F F F
(Repeating Group)
1st Normal Form
F F F F F F
2nd Normal Form F F F
F F F
4th Normal Form F F F PK Candidate Key
F F F F
(Multivalued Dependency) 3rd Normal Form
K.Warawut Database Design 31
32. F 1 (First Normal Form)
F F F F F
F F F 1 F F
F F ˈ F F
K.Warawut Database Design 32
33. F 2 (Second Normal Form)
F F 2 F F F F F
F ( F Non-key Attribute) F
F F F F
F
F F F 2 ʽ F
F F ʽ F
F F ˈ F
K.Warawut Database Design 33
34. F 3 (Third Normal Form)
F F 2 F F F
F F F F F
F F
F F F 3 F
ʽ F ʽ F ˈ F
F F ˈ ʽ F ʽ F F
K.Warawut Database Design 34
35. F 4 (Fourth Normal Form)
F F 4 F F F
F (Multivalued Dependency) ˈ F
Many-to-Many F
ʽ FB F ʽ FA
F ˈ ʽ F ʽ FC
F F F 4 F
F F ʽ F F F
K.Warawut Database Design 35