Question Bank
SQL & Databases interview questions
A SQL query must remain correct with duplicates, NULL values and unusual relationships between tables. Explain joins and grouping before considering execution cost. Test your reasoning with a small table containing edge cases.
Showing 20 of 72 questions
Explain what a primary key is and its role in a relational database.
What are the main differences between INNER JOIN and LEFT JOIN?
What is a CTE (Common Table Expression) and when should it be used?
Explain how B-tree indexes work and their advantages over hash indexes.
Explain the differences between ACID and BASE in the context of databases.
How does the MVCC (Multiversion Concurrency Control) mechanism work in PostgreSQL?
Explain how replication works in databases and what types exist.
What is sharding and what advantages does it provide in distributed databases?
What is the role of the HAVING clause and how does it differ from the WHERE clause?
What are window functions in SQL and how do they differ from aggregate functions?
Explain what a primary key is and how it differs from a unique key.
What is a transaction and what are its main properties according to ACID?
How does the MVCC mechanism work in PostgreSQL and how does it improve performance?
Compare B-tree and Hash indexes. When should each be used?
What is JOIN and what are the main differences between INNER JOIN and LEFT JOIN?
Explain the CAP theorem and how it applies to distributed database systems.
How does sharding work and what problems does it help to solve?
What is pub/sub in Redis and what are its main advantages?
What are the main differences between normalization and denormalization in the context of data modeling?
Prepare for your next interview with Vibe Interview.
Download Vibe Interview