Reputation: 17
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
Upvotes: 1
Views: 457
Reputation: 33818
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 can CourseName
be dependent on CourseId
, when CourseDuration
and CourseFee
are dependent on CourseName
?
Same with the rest of the tables; Event
being a little more complex, has a few more errors.
You cannot normalise, or achieve 3NF, when your starting point is to stick an ID
on everything that moves.
No. First normalise the data. Achieve 3NF. I can understand a CourseCode
or ShortName
as something the user may use to identify course, but no Id
.
After that, if and only if you need to, add an Id
column and the additional index.
Upvotes: 3