Database.Can you give an example where we have composite key and no partial dependency ?

Absolutely! Let’s walk through a clear example where a composite key is used, and no partial dependency exists — meaning the table is in 2NF.


Example: No Partial Dependency (2NF is satisfied)

Table: ExamResults

StudentIDExamIDScore
110185
110290
210175
  • Composite Primary Key: (StudentID, ExamID)
  • Non-key column: Score

🔍 Analysis:

  • Score depends on both StudentID and ExamID together.
    • You need both values to uniquely determine a Score.
  • Score does not depend on only StudentID (a student has many scores)
  • Score does not depend on only ExamID (many students take the same exam)

✅ Therefore, there is no partial dependency — all non-key columns fully depend on the whole key.

➡️ This table is in 2NF.

This entry was posted in Без рубрики. Bookmark the permalink.