I was tired of asking my dev for data


Hi Reader,

Have you been wanting to refresh your knowledge of databases? Maybe even get your hands on the keyboard, create one, and run a few simple queries?

If so, I must have READ YOUR MIND.

Because today, that's exactly what we're doing.

Today in 10 minutes you will:

  • See where a database actually lives inside an app
  • Learn the difference between relational and non-relational, minus the jargon
  • Understand ACID, translated into plain human
  • Create your own free database and run your first queries, hands-on

Why I'm writing about this

For the longest time, databases scared me.

Not because they're scary. Because I didn't know much about them. Coming from a non-technical background, it felt like something that would be hard to grasp.

I'm not a database expert (yet). But through the years, with hands-on practice, I got the basics in.

The first time I pushed myself to log in and run a simple query? It was because I was tired of asking my developer every single time I needed to check some data.

I had this feeling: I JUST WANNA DO IT MYSELF. And it finally won over my fear.

And I know that with AI and a quick Google search, I can handle the rest, at least to the level a product manager actually needs.

So that's what we're doing today. Uncovering the mystery of databases in plain terms, with a hands-on exercise you can follow along with. Because that's how the lessons actually stick.

The database ecosystem

Before we get into databases, it helps to understand where a database actually lives inside an application.

Most apps are built in layers.

There's the frontend, the part you see and click. There's the backend, the logic running behind the scenes. And there's the database, where all the data is stored.

When you do something in an app, like load your orders, the frontend asks the backend, the backend queries the database, and the answer travels back up to your screen.

The database sits at the bottom of all this. Quiet, but holding everything together.

Not every app needs a database, though. If an app only needs to hold something temporarily while it's running, like a value someone just typed or a short session, it can keep that in memory.

But anything kept in memory disappears when the app restarts or shuts down. So the moment your data needs to survive past the current session, you need a database.

Types of databases

You've probably heard names like MySQL, PostgreSQL, and MongoDB.

In reality, there are two main types: relational and non-relational. You'll also see them called SQL (relational) and NoSQL (non-relational).

Today, I want to focus on relational databases, since that's what most of you are working with.

But in two words, what's the difference?

Relational databases organize data into strict, structured tables, with clearly defined connections between them.

Non-relational databases are more flexible. Instead of strict tables, they store data in formats like JSON-style documents. We'll save that one for another day.

Why relational databases (and what ACID means)

So why use a relational database?

Because it protects data integrity. That matters a lot in industries like finance, banking, healthcare, supply chain, and inventory, where wrong or missing data has real consequences.

How does it protect integrity? It follows a principle called ACID.

I don't know why every tech term has to be this hard to remember. So here's my translation:

๐Ÿ”น Atomic (ALL OR NOTHING)โ€‹
It processes the whole transaction or none of it. If something interrupts it at 99%, it cancels everything out.

๐Ÿ”น Consistent (STRICT RULES ONLY)โ€‹
It follows the rules you set. If you say a Name column can't contain numbers, no one can sneak numbers into it.

๐Ÿ”น Isolated (NO CUTTING IN LINE)โ€‹
If several updates hit the same data at once, they're handled in order, one after another, so they don't trip over each other.

๐Ÿ”น Durable (STAYS SAVED)โ€‹
Once it's saved, it stays saved. Even if the server crashes and comes back later, your data is still there.

Let's create one

Now that you can see why relational databases are so useful, let's create one.

I'll walk you through it in a few simple steps, and we'll run some basic queries together.

We'll use Supabase. It's a Backend-as-a-Service platform, basically an open-source alternative to Firebase, and it gives you a free PostgreSQL database to play with.

Two quick notes before we start:

โ†’ The free tier needs no credit card.
โ†’ Free projects pause after 7 days of inactivity. If you come back later and yours looks asleep, just log in and unpause it. Nothing is lost.

๐Ÿ”น Step 1: Create your Supabase account

Go to supabase.com and sign up. Signing in with GitHub or Google is the fastest way.

Then click New project. Give it a name, set a database password (save it somewhere safe), pick a region close to you for speed, and create.

Provisioning takes about two minutes.

๐Ÿ”น Step 2: Create a table

Grab the table code from the Notion file. (I know it's annoying to open another doc just for the code. I tried having it in the newsletter and it looked terrible.)

Open the SQL editor, you will find it on the left pane. Paste the code and run it. It creates the table and adds five sample tickets.

Code:

Result (you can check it out in the Table Editor view, left pane):

A few notes on tables:

A table is just structured data, like a spreadsheet.
โ€‹
Each row is one record, and each column is one piece of information about that record.

For this exercise, we'll create a simple tickets table, like an IT help desk would use. Each row is one support ticket, with columns for its title, status, priority, who it's assigned to, and when it was created.

You'll also see something called a primary key on the id column.

A primary key is the unique label for each row. No two rows can share it, so the database always knows exactly which record you mean. Think of it as the ticket number: every ticket gets its own, and there are never duplicates.

โ€‹
โ€‹๐Ÿ”น Step 3: Run your first queries

All five queries are in the Notion file with copy buttons. Here's what each one does, and what you'll get back.

Query 1: Read everything
โ€‹
โ€‹
โ€‹select * from tickets;
โ€‹
โ€‹
select means "show me." The * means "all columns." So this reads the whole table. That's it, that's a query.
โ€‹

Query 2: Pick columns

โ€‹
โ€‹select title, status from tickets;

โ€‹
Instead of *, you name the columns you want. Now you get just those two. Same data, but filtered to what you need.

Query 3: Filter rows

โ€‹
โ€‹select * from tickets where status = 'open';

โ€‹
where keeps only the rows that match a condition. Query 2 chose which columns to show. This chooses which rows. Only the open tickets come back.

Query 4: Sort

โ€‹
โ€‹select * from tickets order by created_at;

โ€‹
order by sorts the result. Here, oldest first. Add desc to flip it (order by created_at desc).

โ€‹
โ€‹Query 5: Countโ€‹
โ€‹

select count(*) from tickets;

โ€‹
count(*) doesn't list rows, it counts them and gives you one number. This is the first time a query returns a calculation instead of raw data.

Download the full code

I put everything in one Notion page: the table setup and all five queries, each with a copy button so you can paste straight into Supabase.

โ€‹[NOTION LINK]โ€‹

Behind the Scenes

A surprising thing about posting online: it never feels like you're doing it right.

I always feel like a novice, even though it's been more than a year of posting regularly.

A few colleagues recently told me they've been following me from the very beginning. Which makes it sound like the beginning was a long time ago.

But honestly? It still feels like I'm in the beginning.

I wonder how that feeling will evolve.

If you want to laugh a little, check out this post where I was battling Excel like a true internal PM

What do you think?

Did this make databases feel a little less intimidating?

Hit reply and let me know. Did you actually create your table? Did a query trip you up? I read every reply.

See you next week,
Masha

Frankfurt am Main, 60311, Germany
โ€‹Unsubscribe ยท Preferencesโ€‹

Maria Korteleva

Hi, Iโ€™m Maria. For the past 7 years, Iโ€™ve been building internal products across FMCG and tech companies.Now, I share everything Iโ€™ve learned to help junior PMs master delivery from technical skills to stakeholder communication. Join 200+ Internal PMs who get weekly insights from the Build Internal Products newsletter.

Read more from Maria Korteleva

Hi Reader, Have you ever felt like your team is doing CI/CD wrong? What if what's wrong in one context is exactly right in another? Theoretical CI/CD content online always shows the most advanced picture. But we live in a different reality. So let's talk about what our realities actually are, and how you can improve yours. Today in 10 minutes you will: See the 5-question checklist I use to score any delivery pipeline Walk through seven real pipelines, from zero automation to fully automated...

Hi Reader, Every internal product manager wants to build. We're action driven. It feels like our core competency. But put that feeling aside for a second. In a lot of scenarios, buying, not building, is the right call for your context. If you want to learn how to assess this properly, stick with me for this one. Today in 10 minutes you will: Understand why build vs buy gets skipped, even when it shouldn't Learn the 7 steps to run a proper build vs buy assessment See how those steps play out...

Hi Reader, today is a special issue. I am giving you all the templates I have created so far, for free. Why today? Because I am on vacation and wanted to give you a quick win. Templates: Internal Product Website Template: A ready-made internal product page so stakeholders know what your product does and who to ask. Definition of Done Workshop Template: Run a workshop with your team to agree on what "done" actually means. User Persona Template: Capture who your internal users are and what they...