Transactions for System Design Interview (3): isolation levels

SystemDesign
9 min readOct 17, 2022

PREV | HOME | NEXT

Don’t forget to get your copy of Designing Data Intensive Applications, the single most important book to read for system design interview prep! Udacity | Coursera | Pluralsight.

Check out ByteByteGo’s popular System Design Interview Course

Consider signing-up for paid Medium account to access our curated content for system design resources.

Get a leg up on your competition with the Grokking Modern System Design for Software Engineers and Managers and land a Big Tech job!

If you are interviewing, consider buying our number#1 course for Java Multithreading Interviews.

Introduction

Databases generally have several transactions in-flight at the same time, however, these transactions aren’t aware of each other and the database must ensure that one transaction doesn’t step on another transaction. The ability of a database to execute a transaction as if there’s no other transaction executing at the same time is referred to as database isolation.

Check out the course Coderust: Hacking the Coding Interview for Facebook and Google coding interviews.

Unfortunately, there’s no standard definition of the various named isolation levels. Different vendors implement isolation levels differently and the guarantees made for a particular isolation level may not be consistent across different brands of databases. Database vendors generally follow and implement the isolation levels defined in the SQL standard, which is based on System R’s 1975 definition of isolation levels. The SQL standard’s definition of isolation levels is not implementation independent and some literature go so far as to call it imprecise and ambiguous.

Ace the machine learning engineer interview with Grokking the Machine Learning Interview.

In general isolation levels aim to prevent writes and reads of concurrent aborted or temporary transactions while trading off isolation guarantees for improved performance. In the context of distributed systems, isolation levels become more complicated, for instance the serializable isolation level takes on different variations such as one copy-serializability (1SR), strict serializability (strict 1SR), update serializability etc. For this lesson, we’ll…

--

--