Difficulty: Easy
Correct Answer: Correct (underlining is a convention, not a DBMS requirement)
Explanation:
Introduction / Context: During logical design, relation schemas are often shown in textbooks and design documents with the primary key attributes underlined. Students sometimes misinterpret this visual cue as an enforced rule in the DBMS. This question clarifies the difference between documentation notation and actual database constraints.
Given Data / Assumptions:
Concept / Approach: Underlining a primary key attribute in a printed or written schema is a widely used notation to indicate key status at a glance. However, it is merely a convention for human readers. The DBMS recognizes primary keys because you define a PRIMARY KEY constraint in DDL. Nothing in SQL requires a particular visual notation, and documentation styles vary (boldface, asterisks, separate key lists, or crow’s-foot diagrams). Thus, the claim that the primary key “does not need to be underlined” is correct: underlining is optional as a documentation style, not a requirement for validity.
Step-by-Step Solution:
Declare the key in DDL: CREATE TABLE T( id INT PRIMARY KEY, ... ).In the data dictionary or ER diagrams, choose a convention (underline, bold, key icon).Recognize that the DBMS enforces keys via constraints, independent of visual notation.Conclude that underlining is optional and not technically required.Verification / Alternative check: Inspect any DBMS system catalog; primary key status is recorded in metadata tables, not inferred from a document’s typography.
Why Other Options Are Wrong:
Common Pitfalls: Treating classroom notation as a DBMS rule; neglecting to define an actual PRIMARY KEY constraint in DDL because a diagram “shows” an underline.
Final Answer: Correct (underlining is a convention, not a DBMS requirement)
Discussion & Comments