Getting to Yes^W 3NF
October 29, 2009 7:24 AM
Subscribe
Need help getting to 3NF when one attribute is functionally dependent on a combination of other attributes.
I am having problems working out how to get the following situation (or similar ones) into 3NF. I know that in production we would probably not want this to get to 3NF because of the performance hit from JOINs; please ignore such things, this is theoretical.
The situation I'm struggling with is one where an attribute is transitively dependent through a combination of other attributes in the same table, and how to split that out into 3NF.
How do you get to 3NF in a situation like the following:
RoadTrip (tripID, startLocation, finishLocation, distanceDriven)
Details:
tripID is an autonumber/surrogate key
distanceDriven is dependent on both startLocation and finishLocation, because the distanceDriven is the distance between these two locations.
I have mulled this over in my head and tried to figure it out, I suspect my solution is wrong:
RoadTrip (tripID, startLocation, routeID)
FK: routeID references TripRoute.routeID
TripRoute (routeID, finishLocation, miles)
Is that really how to get this into 3NF?
I can't find any good examples of this sort of normalization situation through Google; the examples I see don't have any cases of finctional dependency on a combination of attributes.
The Hive Mind is all that's left. Please hope me normalize!
posted by alex.dudley to technology (10 comments total)
posted by alex.dudley at 7:26 AM on October 29, 2009