Chapter 5 Database Design                                                                                                 ...
Chapter 5 Database Design                                                                                               2 ...
Chapter 5 Database Design                                                                                                 ...
Chapter 5 Database Design                                                                                                 ...
Chapter 5 Database Design                                                                                                 ...
Chapter 5 Database Design                                                                            6          F      F 2...
Chapter 5 Database Design                                                                                                 ...
Chapter 5 Database Design                                                                                                 ...
Chapter 5 Database Design                                                                                                 ...
Chapter 5 Database Design                                                                                           10    ...
Upcoming SlideShare
Loading in...5
×

เอกสารประกอบการบรรยาย

611

Published on

เอกสารประกอบการบรรยาย การออกแบบฐานข้อมูล

Published in: Education, Business, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
611
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

เอกสารประกอบการบรรยาย

  1. 1. Chapter 5 Database Design 1 F (Database Design) F F F F F F F F 01 0005 F F 2000 219.63 Yes 409 0100 F 219.63 Yes 155 02 CD-ROM 0125 SALES MANAGER FACTOMATIC 700.93 No 169 0051 SECRETS OF STARGATE 1,842.99 No 197 0010 US ATLAS 540.19 No 159 03 Hardware 0007 VIDEO CONFERENCING CARD- 369.16 Yes 205 FLY VIDEO OF SOUND 0008 F F Panasonic Model 260.00 Yes 177 VHS F NV-VX3 04 Multimedia 0023 JAPANESE 1, LIYC 278.00 No 326 0055 JAPANESE 2, LIYC 278.00 No 159 F F F F F F F F (%) 10258 015 21/10/xx 28/10/xx 0005 8 25.00% 0100 8 0.00% 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% 0023 4 0.00% Mr.Warawut Khangkhan
  2. 2. Chapter 5 Database Design 2 F F F F F F F F 003 P&S STORE 1 F 159 21 ( ) 10300 250-0750 . 015 Happy Shop 29 . F F 10110 240-2865-75 181 The Book Shop Asia Hotel 296 . 10330 267-8850-5 213 P S Line 2675 F 9 F . 95 . 10330 253-0123 008 The Bookseller 428 Rama I Road, Siam Square Bangkok 10500 233-1717 Mr.Warawut Khangkhan
  3. 3. Chapter 5 Database Design 3 F 1 (First Normal Form) F F F F F F F F F 1 F F F F F F F (Products) F F F F F F F F F F F F F F F F (PK) F F F F F F 1 F F F F F F 01 0005 F F 2000 219.63 Yes 409 0100 F 219.63 Yes 155 02 CD-ROM 0125 SALES MANAGER FACTOMATIC 700.93 No 169 0051 SECRETS OF STARGATE 1,842.99 No 197 0010 US ATLAS 540.19 No 159 03 Hardware 0007 VIDEO CONFERENCING CARD- 369.16 Yes 205 FLY VIDEO OF SOUND 0008 F F Panasonic Model 260.00 Yes 177 VHS F NV-VX3 04 Multimedia 0023 JAPANESE 1, LIYC 278.00 No 326 0055 JAPANESE 2, LIYC 278.00 No 159 F F 1 F F F F F F 01 0005 F F 2000 219.63 Yes 409 01 0100 F 219.63 Yes 155 02 CD-ROM 0125 SALES MANAGER FACTOMATIC 700.93 No 169 02 CD-ROM 0051 SECRETS OF STARGATE 1,842.99 No 197 02 CD-ROM 0010 US ATLAS 540.19 No 159 03 Hardware 0007 VIDEO CONFERENCING CARD- 369.16 Yes 205 FLY VIDEO OF SOUND 03 Hardware 0008 F F Panasonic Model 260.00 Yes 177 VHS F NV-VX3 04 Multimedia 0023 JAPANESE 1, LIYC 278.00 No 326 04 Multimedia 0055 JAPANESE 2, LIYC 278.00 No 159 Mr.Warawut Khangkhan
  4. 4. Chapter 5 Database Design 4 (Orders) F F F F F F F F F F F F F F F F (PK) F F F F F F F F F F F F F F 1 F F F F F F F (%) 10258 015 21/10/xx 28/10/xx 0005 8 25.00% 0100 8 0.00% 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% 0023 4 0.00% F F 1 F F F F F F F (%) 10258 015 21/10/xx 28/10/xx 0005 8 25.00% 10258 015 21/10/xx 28/10/xx 0100 8 0.00% 10258 015 21/10/xx 28/10/xx 0125 15 0.00% 10265 181 21/10/xx 27/10/xx 0005 31 0.00% 10265 181 21/10/xx 27/10/xx 0010 15 0.00% 10278 015 24/10/xx 3/11/xx 0007 16 0.00% 10278 015 24/10/xx 3/11/xx 0008 31 25.00% 10278 015 24/10/xx 3/11/xx 0023 4 0.00% F (Customer) F F F F F Mr.Warawut Khangkhan
  5. 5. Chapter 5 Database Design 5 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 (PK) F F F F F (Products) F (Customers) F F 2 F F F F (Products) F F (Customers) F F F F (Orders) FF F 2 F F F F F F F ( F F Composite Key) F F 2 F F 2 • 1 (Orders) F F F (PK) F F F F F F F FF F F F • 2 (OrdersDetails) F F F F (PK) F F F F F F F F 2 F F F F F F F (%) 10258 015 21/10/xx 28/10/xx 0005 8 25.00% 10258 015 21/10/xx 28/10/xx 0100 8 0.00% 10258 015 21/10/xx 28/10/xx 0125 15 0.00% 10265 181 21/10/xx 27/10/xx 0005 31 0.00% 10265 181 21/10/xx 27/10/xx 0010 15 0.00% 10278 015 24/10/xx 3/11/xx 0007 16 0.00% 10278 015 24/10/xx 3/11/xx 0008 31 25.00% 10278 015 24/10/xx 3/11/xx 0023 4 0.00% Mr.Warawut Khangkhan
  6. 6. Chapter 5 Database Design 6 F F 2 (Orders) F F F F 10258 015 21/10/xx 28/10/xx 10258 015 21/10/xx 28/10/xx 10258 015 21/10/xx 28/10/xx 10265 181 21/10/xx 27/10/xx 10265 181 21/10/xx 27/10/xx 10278 015 24/10/xx 3/11/xx 10278 015 24/10/xx 3/11/xx 10278 015 24/10/xx 3/11/xx (OrderDetails) F F F (%) 10258 0005 8 25.00% 10258 0100 8 0.00% 10258 0125 15 0.00% 10265 0005 31 0.00% 10265 0010 15 0.00% 10278 0007 16 0.00% 10278 0008 31 25.00% 10278 0023 4 0.00% F F 2 One-to-Many (Orders)(OrderDetails) F 1 F F Mr.Warawut Khangkhan
  7. 7. Chapter 5 Database Design 7 F 3 (Third Normal Form) F F 3 F F F F F F F F F F F F F F 3 F F F F F F F F F F (Products) FF F 3 F F F F F F F (PK) F F F (Candidate Key) F F2 • 1 F (Categories) F F F ( F ) F F F F F • 2 F (Products) F F F F F F (PK) F F F F 3 F F F F F F 01 0005 F F 2000 219.63 Yes 409 01 0100 F 219.63 Yes 155 02 CD-ROM 0125 SALES MANAGER FACTOMATIC 700.93 No 169 02 CD-ROM 0051 SECRETS OF STARGATE 1,842.99 No 197 02 CD-ROM 0010 US ATLAS 540.19 No 159 03 Hardware 0007 VIDEO CONFERENCING CARD- 369.16 Yes 205 FLY VIDEO OF SOUND 03 Hardware 0008 F F Panasonic Model 260.00 Yes 177 VHS F NV-VX3 04 Multimedia 0023 JAPANESE 1, LIYC 278.00 No 326 04 Multimedia 0055 JAPANESE 2, LIYC 278.00 No 159 F F 3 F (Categories) F F 01 02 CD-ROM 03 Hardware 04 Multimedia Mr.Warawut Khangkhan
  8. 8. Chapter 5 Database Design 8 F (Products) F F F F F 01 0005 F F 2000 219.63 Yes 409 01 0100 F 219.63 Yes 155 02 0125 SALES MANAGER FACTOMATIC 700.93 No 169 02 0051 SECRETS OF STARGATE 1,842.99 No 197 02 0010 US ATLAS 540.19 No 159 03 0007 VIDEO CONFERENCING CARD-FLY VIDEO OF 369.16 Yes 205 SOUND 03 0008 F F Panasonic Model VHS F NV- 260.00 Yes 177 VX3 04 0023 JAPANESE 1, LIYC 278.00 No 326 04 0055 JAPANESE 2, LIYC 278.00 No 159 F F 2 One-to-Many F (Categories) F (Products) F 1 F F F (Orders), (OrderDetails) F (Customers) 3 F F (PK) F F F Normalization F 3 F BCNF (Boyce/Codd Normal Form) F 3 F F Mr.Warawut Khangkhan
  9. 9. Chapter 5 Database Design 9 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 F F FF F F 4 F F F 4 F Multivalued F F F 2001 1001 1002 F F 2002 1003 F 2003 1004 1005 F First Normal Form F F 2001 1001 2001 1001 F 2001 1001 F 2001 1002 2001 1002 F 2001 1002 F 2002 1003 2002 1003 F 2003 1004 2003 1005 F F F F 3 F F F F F F (PK) F F F (Candidate Key) F F F F 4 F F F F 2 F 3 F F F F F 4NF F F F 2 F Mr.Warawut Khangkhan
  10. 10. Chapter 5 Database Design 10 F F F 4 F 2001 1001 2001 1002 2002 1003 2003 1004 2003 1005 2001 2001 F 2001 F 2002 2002 F 2003 2003 F F Normalization F F 3 F F F F F 4E-R Diagram F Datanamic F F F F FForeign Key (FK) F Primary Key (PK) F F F Primary Key (PK) Mr.Warawut Khangkhan

×