All Questions
Database Indexing easy

What is the relationship between a 'Unique Constraint' and an 'Index' in most databases?

  1. A They are conceptually unrelated; the constraint focuses on business logic, while the index focuses purely on retrieval speed.
  2. B Unique constraints are primarily enforced by middle-tier application filters rather than the database's own storage engine.
  3. C The database assumes that all incoming data is unique by default and only triggers a validation scan during off-peak hours.
  4. D A Unique Constraint typically triggers the creation of an underlying Unique Index to enforce the rule with O(log N) efficiency.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions