• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Database Design
 

Database Design

on

  • 772 views

การออกแบบฐานข้อมูล

การออกแบบฐานข้อมูล

Statistics

Views

Total Views
772
Views on SlideShare
772
Embed Views
0

Actions

Likes
0
Downloads
18
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 Presentation Transcript

    • Mr.Warawut KhangkhanFacebook:Facebook: http://www.facebook.com/AjWarawutTwitter: http://twitter.com/awarawutE-Mail: awarawut@hotmail.comMobile: 089-461-9591 089-461- 5ก ก F (Database Design)
    • กF ก F F F ก F กF ก ก F F ก ก F F F F F F F ก F ก ก F FF กMr.Warawut Khangkhan Chapter 05 Database Design 2
    • F ก ก F (Entity) F (Attribute) F (Relationships)Mr.Warawut Khangkhan Chapter 05 Database Design 3
    • (Entity) F F F F F ก F F ก ก ก F ก F ก ก F ก F กF F ก F ก F F (Customers) (Orders) (Products)Mr.Warawut Khangkhan Chapter 05 Database Design 4
    • F (Attribute) F ก กF F F ก F (Customers) กF กF FกF F( ) F FMr.Warawut Khangkhan Chapter 05 Database Design 5
    • F (Attribute) (Orders) F (Products) F F F F F F F กF F F F F F F F FMr.Warawut Khangkhan Chapter 05 Database Design 6
    • F (Relationships) ก F (Customers) (Orders) F กF 1 N F กF F F FกF F F F กF F F F FMr.Warawut Khangkhan Chapter 05 Database Design 7
    • 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 FMr.Warawut Khangkhan Chapter 05 Database Design 8
    • F F F F (Field) / F (Attribute) F F ก กก F ก F (Record) / (Tuple) ก F F ก (Table) / (Relation) ก F F กMr.Warawut Khangkhan Chapter 05 Database Design 9
    • F F F Field ก F F ก F F กF003 P&S STORE 1 F 159 21 ( ก) ก .015 Happy Shop 29 . F F ก Record181 The Book Shop Asia Hotel 296 . ก213 PS Line 2675 F9 F .95 ก ก .008 The Bookseller 428 Rama I Road, Siam Square Bangkok.Mr.Warawut Khangkhan Chapter 05 Database Design 10
    • F (Relationships) F F (One-to-One Relationships) F FกF (One-to-Many Relationships) F กF FกF (Many-to-Many Relationships)Mr.Warawut Khangkhan Chapter 05 Database Design 11
    • One-to-One-to-One Relationships (1:1) F F F ก F 1 F Fก ก F 1 F ก F F ก 1 F F F F F 1:1Mr.Warawut Khangkhan Chapter 05 Database Design 12
    • 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 177Mr.Warawut Khangkhan 0023 Chapter 05 Database Design JAPANESE 1, LIYC 326 13 1 159 0055 JAPANESE 2, LIYC
    • One-to-One-to-One Relationships (1:1) F 1:1 F F F F ก ก F F ก F F F ก F ก FMr.Warawut Khangkhan Chapter 05 Database Design 14
    • One-To-One-To-Many Relationships (1:N) (1 F F F F F F 1 F Fก F 2 F กก F ก F กF F F F F F กF FMr.Warawut Khangkhan Chapter 05 Database Design 15
    • กF1:N กF 003 F กF P&S STORE F ก F 1 F 159 21 ( ก) ก . 1 015 Happy Shop 29 . F F ก 181 The Book Shop Asia Hotel 296 . ก 213 PS 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% 0023 4 0.00%
    • Many-to-Many-to-Many Relationships (M:N) F F F FF ก F F F F F F Many-to-One ก 2 F Many-to-Many RelationshipsMr.Warawut Khangkhan Chapter 05 Database Design 17
    • Many-to-Many-to-Many Relationships (M:N) F F กF F F กF 1 F ก ก F F F F ก F F Fก F Many-to-ManyMr.Warawut Khangkhan Chapter 05 Database Design 18
    • ก 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 0023 JAPANESE 1, LIYC Chapter 05 Database Design 278.00 No 326 0055 JAPANESE 2, LIYC 278.00 No 159
    • F F F Primary Key: PK ( F ก) Candidate Key ( F F F ) Composite Key Foreign Key: FKMr.Warawut Khangkhan Chapter 05 Database Design 20
    • Primary Key: PK F F F ก F F F F Primary Key FMr.Warawut Khangkhan Chapter 05 Database Design 21
    • Candidate Key F F ก F Primary Key F Fก F ก F F ก F ก F F ก F F F F ก FF FMr.Warawut Khangkhan Chapter 05 Database Design 22
    • Composite Key F F F F F F F ก Primary Key F F ก ก F Composite KeyMr.Warawut Khangkhan Chapter 05 Database Design 23
    • Foreign Key F ( Many) Fก F Primary Key ก ( One) 2 F One-to-Many F กMr.Warawut Khangkhan Chapter 05 Database Design 24
    • ก 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 Mr.Warawut Khangkhan Chapter 05 Database Design 25
    • ก ก F ก ก F F (Application Database) F ก FMr.Warawut Khangkhan Chapter 05 Database Design 26
    • F ก ก F F F F ก ก FF F F กF F F ก( F ก F ก) ก ก ก F F F F F F F F F กMr.Warawut Khangkhan Chapter 05 Database Design 27
    • ก ก F1. ก ก F2. ก F ก F F3. ก F F F4. ก F F F ก ก NormalizationMr.Warawut Khangkhan Chapter 05 Database Design 28
    • 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 FMr.Warawut Khangkhan Chapter 05 Database Design 29
    • F F ก Normalization0NF F F กF ก (Repeating Group)1NF F F F F F F ก F F F2NF F F F ก F F F PK3NF Candidate Key F F ก Fก ก F (Multivalve Dependency)4NFMr.Warawut Khangkhan Chapter 05 Database Design 30
    • ก F 1 (First Normal Form) F F F F ก F F F ก F 1 F F ก ก F F ก ก F FMr.Warawut Khangkhan Chapter 05 Database Design 31
    • ก 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 FMr.Warawut Khangkhan Chapter 05 Database Design 32
    • ก 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 FMr.Warawut Khangkhan Chapter 05 Database Design 33
    • ก F 4 (Fourth Normal Form) F ก F 4 F F ก Fก ก F (Multivalve Dependency) F Many-to-Many ก F ก FB F FA ก Fก กก F FC F F ก F 4 F ก F ก F F ก F ก FMr.Warawut Khangkhan Chapter 05 Database Design 34
    • E-R DiagramMr.Warawut Khangkhan Chapter 05 Database Design 35