Prepare for the A Level Computer Science OCR Exam with engaging quizzes, detailed explanations, and effective study tips. Maximize your readiness and boost your confidence for exam day!

Practice this question and more.


For a table to satisfy Second Normal Form (2NF), what is required regarding the primary key?

  1. Only some attributes must depend on the primary key

  2. All non-key attributes must depend on the entire primary key

  3. No attributes can depend on the primary key

  4. Only the primary key must be unique

The correct answer is: All non-key attributes must depend on the entire primary key

The requirement for a table to be in Second Normal Form (2NF) is that all non-key attributes must depend on the entire primary key. This means that if a table has a composite primary key (a primary key that consists of more than one attribute), every non-key attribute must be functionally dependent on all parts of that composite key. If any non-key attribute depends only on a part of the composite primary key, the table would not be in 2NF and would need to be restructured. Thus, option B accurately captures the essence of 2NF, ensuring that the integrity and organization of the data are maintained by eliminating partial dependencies on the primary key. The other options do not align with the principles of 2NF; for example, indicating that only some attributes must depend on the primary key or stating that no attributes can depend on the primary key misrepresents the requirements for achieving this level of normalization. Furthermore, stating that only the primary key must be unique overlooks the role of all non-key attributes in relation to the primary key's dependencies.