Difficulty: Easy
Correct Answer: Valid (keys enforce uniqueness across objects)
Explanation:
Introduction / Context:
Whether in relational databases or object databases, a key identifies records or objects uniquely. This question evaluates your understanding that declaring a key enforces uniqueness on the specified attributes for all instances of a class (or rows in a table).
Given Data / Assumptions:
Concept / Approach:
A key is a minimal set of attributes whose values uniquely identify an entity. In relational systems, PRIMARY KEY or UNIQUE constraints enforce this. In object models, a declared key similarly prevents two distinct objects from sharing the same key value combination.
Step-by-Step Solution:
Verification / Alternative check:
Attempt an INSERT/CREATE with a duplicate key. The system raises a unique constraint violation, demonstrating enforcement.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing keys with indexes (indexes speed lookups; keys define uniqueness rules); using surrogate keys and forgetting to enforce business keys when required.
Final Answer:
Valid (keys enforce uniqueness across objects)
Discussion & Comments