
Blog
Product
Upsert in SQL: What is an upsert, and when should you use one?
Upserts are useful for anyone who works with a database to know, but the term “upsert” might not even appear in your DBMS’s documentation! So what is an upsert, anyway? And why might it not be mentioned in your docs?

Charlie Custer
May 8, 2023
Engineering
What is a foreign key? (with SQL examples)
A foreign key is a column or columns in a database that (e.g. table_1.column_a) that are linked to a column in a different table (table_2.column_b). The existence of a foreign key column establishes a foreign key constraint – a database rule that ensures that a value can be added or updated in column_a only if the same value already exists in column_b.

Charlie Custer
May 4, 2023
Design
A recipe for disaster recovery (including disaster prevention in practice)
Disasters are expensive. Hilariously expensive. In my career as a software engineer, I’ve employed a bunch of technologies and witnessed most of them - in some way - fail and cause downtime. Downtime (and the thought of downtime), alongside Toilet Time Debugging™, are among the endless reasons a Software Engineer may struggle to switch off.

Rob Reid
May 2, 2023
System
How to reduce risk for consistent data at scale: fintech order architecture simplified
Fintech companies are modernizing how they store and process institutional and retail trades. To understand how, we must first take a quick look at why – what these companies used to do, and why that approach is no longer considered acceptable.
Andrew Deally
May 1, 2023
Product
The importance of being earnestly random: Metamorphic Testing in CockroachDB
Would you fly in an aircraft that wasn’t tested? Get behind the wheel of a car whose model hadn’t been crash-tested? What about using a distributed database for storing your mission critical data that hadn’t been tested and gone through quality assurance? I’d happily wager that if you are a database developer, then anyone that makes use of your database - whether that be directly (developer or database administrator), or indirectly (you, as the end-user of a product that most likely makes use of a database) - is going to feel a whole lot better when you tell them that you test the database. Testing is a fundamental and well accepted part of building functional software.
Nick Travers
April 27, 2023
System
What is the difference between CockroachDB & Google Cloud Spanner?
One caveat before we dive into this comparison of CockroachDB and Google Cloud Spanner: I am not a Spanner expert. I have studied their documentation, tried the product and know their use cases well enough to state that Spanner is an amazing database. In this blog I am not going to unpack all the architectural details of Spanner as that would be a much longer post and I simply would not feel comfortable doing so. I’m going to point out interesting areas in which CockroachDB is distinct from Spanner. Here’s a short video in case you’d rather consume the information that way:

Jim Walker
April 24, 2023
Product
What is change data capture?
CockroachDB is an excellent system of record, but no technology exists in a vacuum. Some of our users would like to keep their data mirrored in full-text indexes to power natural language search. Others want to use analytics engines and big data pipelines to run huge queries without impacting production traffic. Still others want to send mobile push notifications in response to data changes without doing the bookkeeping themselves.
Daniel Harrison
April 21, 2023
System
How to build a highly available database for a multi-region architecture in 3 steps
Nearly every organization has critical systems that need to be up at least 99.99% of the time. Typically, these systems need to recover from downtime in seconds with no data loss while serving vital customers located across an entire country, many countries, or even continents.
Doug Weatherbee
April 17, 2023
applications
Why dating app Doubble matched with CockroachDB
It’s estimated that there’s over 380 million people across the globe that are active on online dating apps – and that number is only growing. In fact, the market for online dating services is projected to reach 9.2 billion USD by 2025. That’s a lot of swiping!

Cassie McAllister
April 16, 2023
