In my Entity Relationship Diagram, an entity type TEACHER had a relationship of TEACH with another entity type called CLASS. CLASS was a week entity type of TEACHER,so when mapping to a Relational Data Model, I had introduced the Primary Key, named TCode, of TEACHER into CLASS as a Foreign Key.

Now, the relation named CLASS contains the following attributes: ICode (FK), CDate, CStartTime, CEndTime.

Primary Key is composite of ICode, CDate, CStartTime.

Following partial dependency exists here: CStartTime -> CEndTime

I need some help on how to convert this into 2NF. I have read up and seen examples of customers and shops etc. etc. but I could not map the understanding into my example.

I'll appreciate if somebody can tell what to do and why?

  • 1
    I don't believe CEndTime does depend on CStartTime because that would imply you could abstract them both to a table with CStartTime as the PK. In other words only one class could ever start at any given time. This seems unlikely. – Michael Green Apr 19 '14 at 13:16
  • No, the partial dependency does not exists -- you are interpreting your current data where all classes have the same duration; however, given that a class may have any duration that conclusion is not valid. When defining FD you must focus on the business rule and all possible legal data values, not the current set of values. – Damir Sudarevic Apr 22 '14 at 12:26
  • ... [cont] And if the rule states that all clases do have the same duration, and that can not change, then you can simply drop the CEndTime column. – Damir Sudarevic Apr 22 '14 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.