Can any one normalise this to 1st normal form?
Registration No.
Date purchased
Cost
Number of seats
garage ID
garage name
garage address
service date
service cost
The garage information represents each service the car has had
thanks
Printable View
Can any one normalise this to 1st normal form?
Registration No.
Date purchased
Cost
Number of seats
garage ID
garage name
garage address
service date
service cost
The garage information represents each service the car has had
thanks
Just quickly cos my tea is ready.... :)
Three tables
tblCar
Registration No.
Date purchased
Cost
Number of seats
tblGarage
garage ID
garage name
garage address
tblService
garage ID
Registration No.
service date
service cost
Don't forget to lose the spaces in the field names :lol:
to me that looks like 2nd and i think 2nd is the furthest it will normalise as 3rd will be done in 2nd nomal form
i think 1st NF is somthing like this
tblCar:
Registration No.
Date purchased
Cost
Number of seats
tblGarage:
garage ID
garage name
garage address
service date
service cost
Registration No.
i think the rule is remove the repeating groups
and 2nd NF would be
tblCar:
Registration No.
Date purchased
Cost
Number of seats
tblGarage:
garage ID
garage name
garage address
Registration No.
tblService:
service date
service cost
garage ID
please correct me if im wrong
Any reason why you only want it normalised to 1NF anyway?
Because i'm learning the steps to change data from un-normalised data to 1ST 2ND and 3RD Normal Form. Therefore, was the post i corrected any good?
thanks
This is already in First Normal Form.Quote:
Originally posted by JamesBowtell
Can any one normalise this to 1st normal form?
Registration No.
Date purchased
Cost
Number of seats
garage ID
garage name
garage address
service date
service cost
The garage information represents each service the car has had
thanks
First normal form requires that you dont have repeating data horizontally e.g have two of same fields (Garage Name twice).
Read this article, it might help you to undrstand more http://dev.mysql.com/tech-resources/...alization.html
So your saying this is 2nd NF?
tblCar:
Registration No.
Date purchased
Cost
Number of seats
tblGarage:
garage ID
garage name
garage address
service date
service cost
Registration No
I dont think it is yet if your relation between Car and Garage is Many to Many. You will have data duplication e.g same garage name twice.Quote:
Originally posted by JamesBowtell
So your saying this is 2nd NF?
tblCar:
Registration No.
Date purchased
Cost
Number of seats
tblGarage:
garage ID
garage name
garage address
service date
service cost
Registration No
Now if in your scenario many to many is not needed and it is a one two many between Garage -> Car (1 Grage services many car, 1 care is Serviced at 1 Garage) then post the GarageID in Car table instead of RegNo in Garage Table
If your scenario is many 2 many relationship(1 car is serviced at many Garage, 1 Garage services many Cars) then you would need to decompose the table and have what they called Bridge Table.
e.g
Car:
Registration No (Primary Key)
Date purchased
Cost
Number of seats
Garage:
garage ID (Primary Key)
garage name
garage address
service date
service cost
Car_Garage:
Registration No
GarageID
(Primary key : Registration No and GarageID)
So by doing that it would be in 2nf? this is confusing...lol