|
-
Nov 10th, 2004, 01:44 PM
#1
Thread Starter
Addicted Member
1ST NORMAL fORM
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
-
Nov 10th, 2004, 02:44 PM
#2
Hyperactive Member
-
Nov 10th, 2004, 03:10 PM
#3
Thread Starter
Addicted Member
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
Last edited by JamesBowtell; Nov 10th, 2004 at 03:39 PM.
-
Nov 11th, 2004, 03:15 AM
#4
Hyperactive Member
Any reason why you only want it normalised to 1NF anyway?
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind.
Dr. Seuss 
-
Nov 11th, 2004, 04:14 AM
#5
Thread Starter
Addicted Member
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
-
Nov 12th, 2004, 10:31 PM
#6
Re: 1ST NORMAL fORM
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
This is already in First Normal Form.
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
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Nov 15th, 2004, 06:30 AM
#7
Thread Starter
Addicted Member
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
-
Nov 15th, 2004, 05:25 PM
#8
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
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.
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)
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Nov 22nd, 2004, 06:39 AM
#9
Thread Starter
Addicted Member
So by doing that it would be in 2nf? this is confusing...lol
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|