For which two constraints does the Oracle Server implicitly create a unique index? (Choose two.)
-
NOT NULL
-
PRIMARY KEY
-
FOREIGN KEY
-
CHECK
-
UNIQUE
Oracle automatically creates unique indexes for PRIMARY KEY and UNIQUE constraints to enforce uniqueness. NOT NULL, FOREIGN KEY, and CHECK constraints do not trigger automatic unique index creation - they use different enforcement mechanisms (check constraints, referential integrity checks).
Oracle automatically (implicitly) creates a unique index to enforce a PRIMARY KEY constraint and a UNIQUE constraint, since both require Oracle to guarantee no duplicate values exist in the constrained column(s), and a unique index is the mechanism used to police that efficiently. NOT NULL is enforced purely by a check on the column value with no index needed. FOREIGN KEY constraints don't get an automatic unique index (Oracle often recommends you manually index FK columns for join performance, but it isn't automatic). CHECK constraints are just boolean expressions evaluated per row — no index involved.