SQL constraints: which of the following is NOT a standard SQL constraint type supported by mainstream relational databases?

Difficulty: Easy

Correct Answer: ALTERNATE KEY

Explanation:


Introduction / Context:
Constraints enforce rules about data validity. Knowing official constraint types helps you model and implement integrity correctly.



Given Data / Assumptions:

  • Common SQL constraint types include PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK, and NOT NULL.
  • Terminology may differ between modeling and implementation.


Concept / Approach:
In logical modeling, “alternate key” means any candidate key that is not chosen as the primary key. However, standard SQL does not have an “ALTERNATE KEY” constraint keyword. You implement alternate keys by declaring UNIQUE constraints.



Step-by-Step Solution:

List official constraint types.Note that “ALTERNATE KEY” is a modeling term, not a SQL DDL keyword.Therefore, select “ALTERNATE KEY” as not a type of SQL constraint.


Verification / Alternative check:
RDBMS documentation shows CREATE TABLE ... UNIQUE (...) for alternate keys rather than an ALTERNATE KEY clause.



Why Other Options Are Wrong:

  • PRIMARY KEY, FOREIGN KEY, UNIQUE are valid SQL constraints.


Common Pitfalls:
Confusing conceptual terms (alternate key) with DDL keywords; implement alternate keys with UNIQUE constraints.



Final Answer:
ALTERNATE KEY

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion