Database design
Upcoming SlideShare
Loading in...5
×
 

Database design

on

  • 1,084 views

เอกสารเพิ่มเติม

เอกสารเพิ่มเติม

Statistics

Views

Total Views
1,084
Views on SlideShare
1,084
Embed Views
0

Actions

Likes
1
Downloads
34
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Database design Database design Document Transcript

  • 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%
  • 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
  • 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 1 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 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
  • 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 1 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% ก 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
  • 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 2 F ก ก 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%
  • 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 ก
  • 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 3 F 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
  • 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
  • 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
  • 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 ʽ F ˈForeign Key (FK) F ˈ Primary Key (PK) F ก ก ก ก ʽ F ก F ˈ Primary Key (PK)