Home

Topic

databases

27 articles across 14 sub-topics

Sub-topic

Read Skew Explained: Inconsistent Snapshots Across Multiple Objects

Read Skew Explained: Inconsistent Snapshots Across Multiple Objects

TLDR: Read skew occurs when a transaction reads two logically related objects at different points in time — one before and one after a concurrent transaction commits — producing a view that never existed as a committed whole. Read Committed isolation...

31 min read
Phantom Read Explained: When New Rows Appear Mid-Transaction

Phantom Read Explained: When New Rows Appear Mid-Transaction

TLDR: A phantom read occurs when a transaction runs the same range query twice and gets a different set of rows — because a concurrent transaction inserted or deleted matching rows and committed in between. Row locks cannot stop this because the phan...

29 min read
Write Skew Explained: The Anomaly That Requires Serializable Isolation

Write Skew Explained: The Anomaly That Requires Serializable Isolation

TLDR: Write skew is the hardest concurrency anomaly to reason about: two concurrent transactions each read a shared condition, decide they can safely proceed, and then write to different rows. No individual operation is wrong. No row was overwritten....

22 min read

Non-Repeatable Read Explained: When the Same Query Returns Different Results

TLDR: A non-repeatable read happens when the same SELECT returns different results within a single transaction because a concurrent transaction committed an update between the two reads. Read Committed isolation — the default in PostgreSQL, MySQL, an...

24 min read
Sharding Approaches in SQL and NoSQL: Range, Hash, and Directory-Based Strategies Compared

Sharding Approaches in SQL and NoSQL: Range, Hash, and Directory-Based Strategies Compared

TLDR: Sharding splits your database across multiple physical nodes so no single machine carries all the data or absorbs all the writes. The strategy you choose — range, hash, consistent hashing, or directory — determines whether range queries stay ch...

27 min read
Key Terms in Distributed Systems: The Definitive Glossary

Key Terms in Distributed Systems: The Definitive Glossary

TLDR: Distributed systems vocabulary is precise for a reason. Mixing up read skew and write skew costs you an interview. Confusing Snapshot Isolation with Serializable costs you a production outage. This glossary organises every critical term into co...

45 min read