Charlie is a former teacher, tech journalist, and filmmaker who’s now combined those three professions into writing and making videos about databases and application development (and occasionally messing with NLP and Python to create weird things in his spare time).
Product
What is a UUID, and what is it used for?
When working with a database, it’s common practice to use some kind of id field to provide a unique identifier for each row in a table. Imagine, for example, a customers table. We wouldn’t want to use fields such as name or address as unique identifiers because it’s possible more than one customer could have the same name, or share the same address, or in some cases even both! Instead, it’s a good idea to assign each row some kind of truly unique identifier. One option we have is to use a UUID.
Charlie Custer
June 29, 2023
System
How to use ADD CONSTRAINT in SQL (with examples)
One of the most compelling reasons to use a SQL database is that it can enforce rules about data for you, ensuring that it can only enter the database if it meets your specifications. But for it to do that effectively, you have to tell it what those rules are, so let’s talk about SQL constraints and how to add a constraint.
Charlie Custer
June 29, 2023
Engineering
3 common foreign key mistakes (and how to avoid them)
Foreign keys are an important element of any relational database. But when you’re setting up your database schema, it’s relatively easy to create problems for yourself if the foreign keys aren’t set up correctly. Here are three of the most common mistakes made with foreign keys, and a little advice on how to avoid them!
Charlie Custer
June 28, 2023
Culture
How we celebrate Pride year-round at Cockroach Labs
CREWS (Cockroach Employees Who Support) are groups intended to create an inclusive environment for Roachers (Cockroach Labs employees) from underrepresented backgrounds and help employees connect with their peers on a deeper level. In this article, we’ll take a closer look at one such group: Roacher Pride
Charlie Custer
June 20, 2023
Product
Life after Oracle: a story about migration
CockroachDB has lots of customers who’ve switched from Oracle and other legacy SQL databases, saving both money and time. Generally speaking, though, we can’t share their names or specific details about their internal processes and workloads. So in this article we’ll be doing something a bit different. We wanted to tell the story of what it’s like for a finance company to transition from Oracle to CockroachDB. The names and quotes in this narrative are fictional, but the story itself is real. It comes from the things we’ve heard working with real-world customers in the finance industry – including Fortune 50 banks – who are moving transactional workloads off of Oracle and onto CockroachDB.
Charlie Custer
June 15, 2023
Product
Synchronous and asynchronous database replication explained (& how data gets lost)
It’s 10 o’clock. Do you know where your data is? Chances are, it’s nestled snugly in its database. But chances are that it’s also less secure than you might think. Even in sophisticated systems with backups and failover plans, data loss is possible. And importantly, it can happen without you realizing it’s even possible – at least, not until it’s too late.
Charlie Custer
June 13, 2023
Engineering
What is a database hotspot, and how do you fix it?
In a distributed database, a hotspot is an overworked node – in other words, a part of the database that’s processing a greater share of the total workload than it is meant to handle.
Charlie Custer
June 7, 2023
System
What are user-defined functions (UDFs) in SQL, and why should you care?
When people think about improving application performance, they’re often thinking of cleaning up the code in the application layer. However, the database layer can also be optimized to improve application performance, and so can the ways in which these two layers – application and database – interact with each other.
Charlie Custer
May 18, 2023
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