Explain ACID
ACID stands for atomicity, consistency, isolation, and durability.
- Atomicity means all or nothing
- Isolation controls concurrency visibility
- Durability survives crashes after commit
Explain ACID
Tagged with sql
ACID stands for atomicity, consistency, isolation, and durability.
Explain ACID
Joins combine rows from tables based on a related key, with inner and outer joins deciding what unmatched rows survive.
Explain SQL joins
WHERE filters rows before grouping, while HAVING filters groups after aggregation.
HAVING vs WHERE in SQL
A primary key uniquely identifies a row in its own table, while a foreign key points to a related row in another table.
Primary key vs foreign key
Joins combine tables directly, while subqueries nest one query inside another; either can be correct depending on clarity and plan quality.
Subquery vs join
Inner joins return matches, outer joins preserve unmatched rows from one or both sides depending on the type.
What are common SQL join types and when do you use them?
Transactions group multiple statements into one atomic unit so partial updates do not leak through on failure.
What are transactions?
Window functions compute values across a related set of rows without collapsing them into one row per group.
What are window functions?
GROUP BY collects rows by one or more columns so aggregate functions can run per group.
What does GROUP BY do?
An execution plan shows how the database intends to run a query, including scans, joins, sorts, and index usage.
What is an execution plan?