I need to identify functional dependenciers and normalise the following tables to 3NF. I'm still unclear of all dependencies.
If I have dependencies do I push them into other tables?
Video store
Customer table
customerNo | customername | address | phone | numberofbooking
customerno
is my primary key, everything except numberofbooking
is dependent on customerno
?
video table
SerielNo | CopyNumber | title | yearmade | director | origen
As serielno
is not unique I was or copy number I was goint to add a videoId
unique to each video as a serial number can have many copies.
rentals table
title | customerName
Not sure what to do here.
Remove the NumberOfBooking field from the customer table. This is redundant, and can easily be calculated from the rentals table.
Consider splitting the video table into two tables, where one contains the information of a unique video, and the other contains information about the copies of each video.
Consider adding an id to identify the video copies, this is easier to use than a combination of serial number and video copy number.
Consider adding a director table, as some directors will have made several videos.
Consider adding a country table, as many videos will come from the same country.
Use the customer number in the rentals table, not the customer name. The customer name might not be unique.
Use the identity of the video copy in the rentals table, not the video title.