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
 General SQL Server Forums
 New to SQL Server Programming
 Normalisation

Author  Topic 

puppykitten
Starting Member

4 Posts

Posted - 2009-05-16 : 13:25:04
Hi, please could someone normalise this to 3NF for me. or explain to me if it should only go to 2NF

GuestID, FullName, Address, Postcode, (RoomNo, RoomName, RoomType, Ensuite, Cost, CheckIn, CheckOut, NosDays)

I want 3 tables at the end for GUEST BOOKING and ROOM.
thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-05-16 : 14:36:10
can we see what you tried till now?
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-05-16 : 14:40:37
http://www.datamodel.org/NormalizationRules.html


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

puppykitten
Starting Member

4 Posts

Posted - 2009-05-16 : 17:51:12
GUEST(GuestID, FullName, Address, Postcode.)
ROOM (RoomNo, RoomName, RoomType, Ensuite, Cost, CheckIn, CheckOut, NosDays.)
BOOKING (GuestID, RoomNo, CheckIn CheckOut NosDays)
Go to Top of Page

puppykitten
Starting Member

4 Posts

Posted - 2009-05-16 : 17:51:59
Im confused as to whether thats even normalisation that im doing... :S
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-05-17 : 03:02:23
why have you included NosDays. in ROOM? Shouldnt that be in BOOKING alone?
Go to Top of Page

puppykitten
Starting Member

4 Posts

Posted - 2009-05-17 : 05:08:46
GUEST(GuestID, FullName, Address, Postcode.)
ROOM (RoomNo, RoomName, RoomType, Ensuite, Cost)
BOOKING (GuestID, RoomNo, CheckIn CheckOut NosDays)

that would be better wouldnt it?

but is this to 3nf? or 2nf?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-05-17 : 09:36:52
yup this looks fine.
Go to Top of Page
   

- Advertisement -