DATA-MANAGEMENT-FOUNDATIONS practice question 9 of 15

Where does a primary key traditionally appear in a table?

Full set: 60 questions

Domain Relational Database Fundamentals

Answer options
A: In the table header
B: In the first column Correct answer
C: In the top row
D: In the last visible column
Correct Answer:
B. In the first column
Explanation

By convention and as a widely accepted best practice in relational database design, the primary key column is placed first in a table's column order. This practice is not enforced by the SQL standard but significantly enhances the logical clarity and readability of the table structure. Placing the unique identifier for each record at the beginning makes it easy for developers and analysts to immediately understand the key attribute around which the table is organized. This logical ordering is a fundamental principle taught in database design courses.

Why Incorrect

A. The table header defines column names and data types (metadata), not the actual key values, which reside in the table's rows.
C. A row represents a single record; a primary key is a column (attribute) that applies to all rows to ensure each is unique.
D. While technically possible, placing the primary key in the last column is highly unconventional and contradicts standard design principles for readability.

References

1. Coronel, C., & Morris, S. (2016). Database Systems: Design, Implementation, and Management (12th ed.). Cengage Learning. In Chapter 3, "The Relational Database Model," all example tables, such as the AGENT table in Table 3.3 (p. 89), consistently list the primary key attribute (AGENTCODE) as the first column in the table structure, demonstrating this as a standard convention.

2. Silberschatz, A., Korth, H. F., & Sudarshan, S. (2020). Database System Concepts (7th ed.). McGraw-Hill. Throughout the text, relational schemas are presented with the primary key attributes listed first. For instance, in Chapter 2, Section 2.2, "Database Schema," the example instructor relation is defined as instructor(ID, name, deptname, salary), with the primary key ID as the first attribute.

3. Stanford University. (2016). CS145 Introduction to Databases, Lecture 2: Relational Model. In the lecture notes, relational schemas are consistently defined with the primary key attribute(s) listed first. For example, the Student relation is shown as Student(sID, sName, GPA, sizeHS), where sID is the primary key. This illustrates the standard academic convention for representing table structures. (Available via Stanford's public course archives).

Scroll to Top