I’ve been given the task of normalizing this set of data:
COURSE=(CourseID, CourseName, CourseDuration, CourseFee{
DelegateID, DelegateName, DelegateAddress, EventID, EventName, VenueID, VenueName, VenuePrice, BookingID, BookingType, BookingDate
})
The scenario is an IT company that runs short training courses at various hotels around the country, each event being hosted by one or more presenters (hence the BookingType – either Delegate or Presenter, if Presenter then no booking charge). An event is just an instance of a course running at a particular venue. VenuePrice refers to the cost for optional bed and breakfast at the hotel venue for the intervening nights
Here is what I have come up with for 3NF:
COURSE=(CourseID, CourseName, CourseDuration, CourseFee)
DELEGATE=(DelegateID, DelegateName, DelegateAddress)
EVENT=(EventID, VenueID*, CourseID*, EventName, EventDate)
BOOKING=(BookingID, DelegateID*, EventID*, BookingDate, BookingType)
VENUE=(VenueID, VenueName, VenuePrice)
I’d like to know if this is at all accurate, and if not, perhaps a guiding hand in the right direction?
Thanks
On what basis do you think that is in 3NF ?
Let’s take a really simple example,
Course. Where exactly if he Functional Dependency, on what key ? How canCourseNamebe dependent onCourseId, whenCourseDurationandCourseFeeare dependent onCourseName?Same with the rest of the tables;
Eventbeing a little more complex, has a few more errors.You cannot normalise, or achieve 3NF, when your starting point is to stick an
IDon everything that moves.No. First normalise the data. Achieve 3NF. I can understand a
CourseCodeorShortNameas something the user may use to identify course, but noId.After that, if and only if you need to, add an
Idcolumn and the additional index.