Trade-Offs in Databases 00:00:01 Five copies and one shared witness A record lives on five fixed copies. Three acknowledge its next version and three later answer a read. Try picking the read set so that every writer is avoided. All hold v1. Copies 1, 2 and 3 confirm. The write counts as done. The read asks 3, 4 and 5. Copy 3 is in both sets. Answers v2, v1, v1. The newest is v2, and copies 4 and 5 are repaired. Three plus three exceeds five, forcing overlap. This diagram assumes comparable versions and no competing write. Intersection alone does not establish every correctness property of the database. 00:00:54 Make the single-copy read cheap A catalog sees many reads between updates. Require all five copies to confirm each write, then allow a read to contact only one. Predict the effect of a single unavailable copy. All five confirm v2. The slowest decides the time. Copy 5 alone answers. It must be up to date. Copy 2 is down. Only four can confirm, so writes stop. A successful all-copy write covers every member of this fixed set. The latency and availability bill is paid when changing the catalog, especially when a distant replica is down. 00:01:39 Put the waiting on the reader Flip the settings. One replica can confirm a write, while a read waits for all five. Follow the only copy that currently contains the new value. Copy 1 confirms v2 and the client goes on. All five are asked; copy 1 has the newest. The only copy of v2 is gone. Reads stop, and v2 may be lost. Acknowledging once increases exposure to losing that copy before propagation. Moving work to readers also makes their availability depend on every required participant. 00:02:18 Pick the response that sets the latency Three replicas answer in two, seventy and one hundred forty milliseconds. Launch all requests together and predict the completion time for thresholds of one, two and three. Answers take 2, 70 and 140 ms. The nearest answers in 2 ms. A majority needs the second: 70 ms. All copies: the farthest decides, 140 ms. The threshold selects an order statistic of response time. In this example a majority takes seventy milliseconds, ignoring coordinator overhead and assuming these are full response times. 00:03:04 The last item still sells twice Two customers each read one remaining unit before either customer writes zero. Both reads and writes use overlapping quorums. Count the successful purchases rather than the final stored number. All three copies say so. Two buyers read with R equals 2. Both see 1. Both writes get 2 confirmations. One item is sold twice. Write 0 only if it is still 1, decided by one leader. The second buyer is told no. Enforce the stock check and decrement as one conditional decision under appropriate isolation. A final value of zero can hide two accepted purchases of a single item.