Question

    In the context of a relational database, which of the

    following is NOT a characteristic of a candidate key ?
    A It uniquely identifies a tuple in a relation. Correct Answer Incorrect Answer
    B It may consist of one or more attributes Correct Answer Incorrect Answer
    C It can contain NULL values. Correct Answer Incorrect Answer
    D There can be multiple candidate keys in a relation Correct Answer Incorrect Answer
    E A subset of a candidate key is not a candidate key. Correct Answer Incorrect Answer

    Solution

    A candidate key is a minimal superkey that uniquely identifies tuples in a relation. A fundamental property of candidate keys is that they cannot contain NULL values. This is because NULL signifies "unknown" or "not applicable," and allowing NULL values in a candidate key would mean that we cannot guarantee the uniqueness of the key. If a candidate key were allowed to have NULL values, there could be ambiguity in identifying records, which violates the principle of uniqueness and reliability. For example, if two tuples share the same key attributes except for one containing a NULL, the database cannot assert the uniqueness of these tuples. Why Other Options Are Incorrect:

    • Option A: This is a true characteristic of candidate keys. Candidate keys must always uniquely identify each tuple in the relation to ensure data integrity.
    • Option B: A candidate key can indeed be composite, consisting of multiple attributes if no single attribute suffices to uniquely identify the tuple.
    • Option D: A relation can have multiple candidate keys, but only one is chosen as the primary key, while the others remain alternate keys.
    • Option E: A candidate key is minimal, meaning no subset of its attributes can function as a key. This makes this statement a true property.

    Practice Next