Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Learning normalization :)

$
0
0
Currently I am trying to learn database normalization which is not very easy for me to understand. I found some data examples and I was trying to do normalization but I am not sure that I am doing it correctly.

What I found is :

Trip_id
Departure
Return
Duration
Driver_first_name
Driver_last_name
Vehicle_registration
Manifest_barcode
Item_weight
Pickup_customer
Delivery_customer
Category
Description
Requirements

What I end up with is :

(1NF)
Trip_id-------Primary key
Departure
Return
Duration
Driver_first_name
Driver_last_name
Vehicle_registration
Manifest_barcode
Item_weight
Pickup_customer
Delivery_customer
Category
Description
Requirements


(2NF)
Trip_id--------Primary key
Departure
Return
Duration
Driver_first_name
Driver_last_name
Vehicle_registration


Trip_id-----------------Primary key
Manifest_barcode-------Primary key
Item_weight
Pickup_customer
Delivery_customer
Category
Description
requirements





(3NF)
Trip_id-----------Primary key
Departure
Return
Duration
Driver_first_name
Driver_last_name


Trip_id----------------Primary key
Manifest_barcode-----------Foreign key
Item_weight
Pickup_customer
Delivery_customer


Manifest_barcode-----------Primary key
Vehicle_registration------------Foregin key
Category
Description
Requirements


Is this right ?
or I am doing something wrong and WHY?

Thanks

Viewing all articles
Browse latest Browse all 13329

Trending Articles