Normal Forms   «Prev  Next»

Representing Functional Dependencies - Exercise

Objective: Represent functional dependencies using proper notation.

Functional dependencies (FDs) are required for achieving Second Normal Form (2NF)

Functional dependencies (FDs) are essential for achieving Second Normal Form (2NF) in a relational database. 2NF builds upon the foundation of First Normal Form (1NF) and addresses the issue of partial dependencies, where non-key attributes depend on only part of the primary key. Here's how FDs play a role in 2NF:
  1. Identifying partial dependencies:
    • FDs help us understand the relationships between attributes in a relation. By analyzing these relationships, we can identify which non-key attributes depend on only a part of the primary key.
  2. Eliminating partial dependencies:
    • To achieve 2NF, we need to eliminate these partial dependencies. This can be done in two ways:
      • Moving the dependent attribute(s): If a non-key attribute depends on only a part of the primary key, we move it to a new relation where the portion of the primary key it depends on becomes the full primary key of the new relation.
      • Combining the dependent attribute(s): If multiple non-key attributes depend on the same partial key, we can combine them into a single composite attribute that fully depends on the primary key.
  3. Ensuring all non-key attributes depend on the entire key:
    • Once we have eliminated all partial dependencies, we can be sure that every non-key attribute in the table is fully functionally dependent on the entire primary key. This is the key requirement for 2NF.

Therefore, understanding and analyzing FDs is crucial for correctly identifying and eliminating partial dependencies, ultimately achieving 2NF in a database table.

Exercise Scoring

This exercise is worth a total of 10 points.
You will receive up to five points for correctly identifying each functional dependency in the given relations.


Identify the functional dependencies in the following relations and represent the dependencies using the proper notation.
  1. Book (BookID, Title, Publisher, Year, ISBN)
  2. Computer (CompID, CPU, Memory, HardDrive, Floppy, Monitor)

Submitting your Exercise

Type or paste the normalized relations into the text box below, then click Submit to submit them and view a results page.