Interview Q&A / SQL & DBMS

INTERVIEW Q&A · 69 QUESTIONS

SQL & DBMS interview questions

Joins, keys, normalisation, indexes and transactions for placement and backend interviews.

  1. What is the difference between a surrogate key and a natural key?

    A natural key is a real-world attribute that is unique, like email or Aadhaar number. A surrogate key is a meaningless generated value, like an auto-increment id. Surrogate keys stay stable when business data changes.

    IntermediateQuick answer1 min read