Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 Other Topics
 Learning normalization :)

Author  Topic 

Oggie25
Starting Member

1 Post

Posted - 2012-11-09 : 17:59:57

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
Edit/Delete Message
   

- Advertisement -