If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Chit Chat > normalization

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Nov 2012
Posts: 2
normalization

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
Reply With Quote
  #2 (permalink)  
Old
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 12,094
close
bear in mind you do not want to repeat information so you need to revisit at least TripID
Fundamentals of Relational Database Design -- r937.com
The Relational Data Model, Normalisation and effective Database Design
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Jan 2013
Location: Poland
Posts: 3
Quote:
Originally Posted by healdem View Post
close
bear in mind you do not want to repeat information so you need to revisit at least TripID
Fundamentals of Relational Database Design -- r937.com
The Relational Data Model, Normalisation and effective Database Design
Very good resources. Helped me a lot! Thanks
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On