Another dodgy question from VCAA imo.
Wish I had more time to really sit down and look at this question, but if we had to fully normalise the relation it would look like this:
CAPTAIN (CaptainID, CFirstName, CLastName, CPhone)
BOAT (BoatID, BoatName, BoatLocation, BoatRate, CaptainID) --- A boat has a captain. A captain can be the captain of many boats. 1:M relationship
BOATHIRE (BoatID, BoatHours, CPay) --- By knowing the BoatID, we know the captain due to the implied relationship.
But the question only asks for 2NF.
For a relation to be in 2NF:
*Must be in 1NF (no repeating groups, atomic values only, PKs defined)
*No partial dependencies (every non-key atttribute must be fully dependent on the entire key)
1NF:
BOATHIRE (BoatID, CaptainID, BoatName, BoatLocation, CLastName, CFirstName, CPhone, BoatRate, BoatHours, CPay)
(atomic values, no repeating groups, PKs defined)
2NF:
BoatName, BoatRate and BoatLocation are not dependent on the entire key. Same as how CLastName, CFirstName, and CPhone are ONLY dependent on CaptainID, and NOT BoatID.
BOAT (BoatID, BoatName, BoatLocation, BoatRate, BoatHours, CPay, CaptainID )
CAPTAIN (CaptainID, CLastName, CFirstName, CPhone)
I THINK this satisfies 2NF. Only had a quick look at the question (my apologies).
Now the question doesn't state 3NF but it's VERY CLEAR this relation isn't 3NF due to the transitive dependency (a non key depending on another non key). In this case, CPay depends on BoatHours. (BoatHours -> CPay). Every time you need to create a new insert of Boat, you need to provide BoatHours and CPay (insert anomaly).
Then we would get:
BOATHIRE (BoatID, BoatHours, CPay) --- Please note the question doesn't ask about 3NF.
In summary I THINK this is 2NF:
BOAT (BoatID, BoatName, BoatLocation, BoatRate, BoatHours, CPay, CaptainID )
CAPTAIN (CaptainID, CLastName, CFirstName, CPhone)