In a proper relation, does the order of the columns (attributes) matter for the meaning of the data?
-
ACorrect
-
BIncorrect
-
COnly matters when using SELECT *
-
DOnly matters for composite keys
Answer
Correct Answer: Correct
Explanation
Introduction / Context:Attributes in a relation form a set, and sets have no inherent order. This question checks whether column order is semantically meaningful in the relational model.
Given Data / Assumptions:
- A relation is defined over a set of attributes, not an ordered list.
- SQL may display columns in a chosen order, but that is presentation.
- Users can request any explicit order in SELECT lists.
Concept / Approach:Because attributes are a set, shuffling column positions does not change the relation’s meaning. Only attribute names and their domains matter. Any dependence on visual position is a UI concern, not a relational one.
Step-by-Step Solution:
Recall set semantics: sets are unordered.Relate to schema: schema defines attribute names and types, not positions.Conclude: column order does not matter to the relation’s semantics; thus the statement is correct.Verification / Alternative check:Write SELECT y, x FROM T; it is the same data as SELECT x, y FROM T reordered; the schema is unchanged.
Why Other Options Are Wrong:
- “Incorrect” conflicts with fundamental set semantics.
- Mentions of SELECT * or composite keys are implementation/presentation issues, not changes to meaning.
Common Pitfalls:Believing that position in CREATE TABLE determines semantics. It determines default display order only.
Final Answer:Correct