/Database

Migrating Billions Of Records: Moving Our Active DNS Database While It’s In Use

- Alex Fattouche Corey Horton tl;dr: “When initially measured in 2022, DNS data took up approximately 40% of the storage capacity in Cloudflare’s main database cluster (cfdb). This database cluster, consisting of a primary system and multiple replicas, is responsible for storing DNS zones, propagated to our data centers in over 330 cities via our distributed KV store.” 

featured in #565


Things You Should Know About Databases

- Mahdi Yusuf tl;dr: "So, without fully getting into the weeds on database-specific quirks, I will cover everything you should understand about RDBMS indexes. I will touch briefly on transactions and isolation levels and how they can impact your reasoning about specific transactions."

featured in #553


Dealing With Large Tables

- Benjamin Dicken tl;dr: “Large databases often have a small number of very large tables that makes scaling difficult. How can you scale with these while keeping your database performant? This article covers vertical scaling, vertical sharding and horizontal sharding.”

featured in #550


B-trees And Database Indexes

- Benjamin Dicken tl;dr: “By the time you finish this article, you'll have learned how B-trees and B+trees work, why databases use them for indexes, and why using a UUID as your primary key might be a bad idea.”

featured in #549


Speed Up Your App By Caching Database Queries

- Jon Harrell tl;dr: Users demand speed and efficiency. Caching database queries can significantly improve your app's performance. Discover how to use caching to get lightning-fast load times and a smooth user experience for all of your users globally, no matter where your database lives.

featured in #541


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 #536


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