Search code examples
databasedatabase-designnormalization3nfthird-normal-form

Are my DB tables normalised to 3NF?


I need to make sure my schema is in 3NF, but am not too sure about my "StudentHomework Table" can someone help?

http://prntscr.com/6ry22u


Solution

  • The main concern I have with your approach is the lack of relation between Teacher and Subject.

    The way I see it, a HomeworkTask should have a SubjectId, and the Subject should be taught by a Teacher.

    So, I would do this. A new Table, Subject:

    Table Subject:
    Id (PK)
    TeacherId (FK)
    Name
    Description
    ... any other fields necessary
    

    Then, refactor HomeworkTask:

    Table HomeworkTask:
    Id (PK)
    SubjectId (FK)
    HomeworkTitle
    SetDate
    DueDate
    

    Apart from this, you have clear Primary keys, all non prime attributes depend on the PKs and nothing but the PKs, so you should be home free for the 3rd normalization form.

    Hope this helps. Cheers!