Hi!
In this chapter, we are told to use Serializable tx isolation level to keep seats 54, 55 and 56 isolated from other users that are trying simultaneously to book them.
But why do we exactly need Serializable?
From my point of view, we wouldn’t face Phantoms because SeatID is a unique field and there won’t be another row with SeatID = 54, hence we don’t need to lock a range but we simply need to lock only these particular rows with SeatID = 54, 55, 56.
Consequently, we can use Repeatable Read tx isolation level in order to prevent Nonrepeatable reads.