/Database

The Best Engineering Interview Question I’ve Ever Gotten, Part 1

- Arthur O’Dwyer tl;dr: "It’s been a while since I was on the receiving end of a software engineering interview. But I still remember my favorite interview question. It was at MemSQL circa 2013... Since MemSQL was a database company, this is a database challenge."

featured in #535


Many Yes/No Attributes: Table Design Study

- Alexey Makhotkin tl;dr: “I wanted to demonstrate the relationship between the logical model and a physical model. We’re going to design a commonly seen use case: many yes/no attributes of a single anchor (in our case, Restaurant). Then we’ll discuss how the physical tables would be designed. We’ll see that sometimes physical design strategy changes as the system becomes more mature. At the same time, logical design elements never change if the business requirement is still relevant.”

featured in #532


Taking Random Samples From Big Tables

- Eric Fritz tl;dr: “You’ll learn how to randomly sample large datasets in PostgreSQL while keeping your queries performant. Instead of telling you “the answer,” we’ll walk through possible solutions and their tradeoffs, and help you build a deeper understanding of databases.”

featured in #524


You'll Regret Using Natural Keys

- Mark Seemann tl;dr: “Is it ever a good idea to use natural keys in a database design? My experience tells me that it's not. Ultimately, regardless of how certain you can be that the natural key is stable and correctly tracks the entity that it's supposed to keep track of, data errors will occur. This includes errors in those natural keys.”

featured in #522


SimpleDB: A Basic RDBMS Built From Scratch

- Akila Welihinda tl;dr: “My databases class at UCLA wasn’t very challenging so I never truly understood the internals of databases. This always bothered me so I vowed to build a simple database from scratch to learn the fundamentals... The SimpleDB database I built has basic RDBMS features like a SQL query parser, transactions, and a query optimizer. This blog post provides an outline of SimpleDB’s architecture and implementation.”

featured in #522


How Stripe’s Document Databases Supported 99.999% Uptime With Zero-Downtime Data Migrations

- Jimmy Morzaria Suraj Narkhede tl;dr: “In 2023, Stripe processed $1 trillion in total payments volume, all while maintaining an uptime of 99.999%. We obsess over reliability. As engineers on the database infrastructure team, we provide a database-as-a-service (DBaaS) called DocDB as a foundation layer for our APIs.” The authors discuss Stripe’s database infrastructure, and discuss the design and application of the Data Movement Platform.

featured in #521


Database Design For Google Calendar: A Tutorial

- Alexey Makhotkin tl;dr: “In this database design tutorial I’m going to show how to design the database tables for a real-world project of substantial complexity. We’ll design a clone of Google Calendar. We will model as much as possible of the functionality that is directly related to the calendar.”

featured in #520


Database Design For Google Calendar: A Tutorial

- Alexey Makhotkin tl;dr: “In this database design tutorial I’m going to show how to design the database tables for a real-world project of substantial complexity. We’ll design a clone of Google Calendar. We will model as much as possible of the functionality that is directly related to the calendar.”

featured in #519


Common DB Schema Change Mistakes

- Nikolay Samokhvalov tl;dr: Nikolay covers 18 mistakes, categorized into three big categories of DB schema migration mistakes: "(1) Concurrency-related mistakes. (2) Mistakes related to the correctness of steps. (3) Miscellaneous – mistakes related to the implementation of some specific database feature or the configuration of a particular database."

featured in #511


Database Fundamentals

- Tony Solomonik tl;dr: "I tried thinking which database I should choose for my next project, and came to the realization that I don't really know the differences of databases enough. I went to different database websites and saw mostly marketing and words I don't understand. This is when I decided to read the excellent books Database Internals by Alex Petrov and Designing Data-Intensive Applications by Martin Kleppmann. The books piqued my curiosity enough to write my own little database I called dbeel. This post is basically a short summary of these books, with a focus on the fundamental problems a database engineer thinks about in the shower."

featured in #508