#009 The Well Download
Workshop #009 · hands on — a real database, free

The Wellwhere the information actually lives

Your folder of files has worked fine so far. This is the session about the four moments it stops working, and the one thing that replaces it.

By the end of today you will know what a database is for, when you need one, and — just as usefully — when a folder of files is still the right answer.

Presented by Emile du Toit
brainitconsulting.com

Where we got to

Here is an overview of last time in five lines.

  • You wrote a map — one page saying what a job is, before anybody builds it.
  • Five headings, and the last one is what you are not sure about.
  • You say what, not how. Deciding how is the part it is good at.
  • The map lives in the folder, beside your house rules, and gets marked like everything else.
  • And heading two asks where the information comes from.

Which is where today starts.

Contents

  1. Before you startA free Vercel account, and a list you keep somewhere awkward.
  2. Where does it actually live?Four moments a folder gives out.
  3. One well, many troughsWhat a database is for, and when you do not need one.
  4. Rows and columns is the whole ideaThere is less to this than people expect.
  5. Asking the well a questionYou will not write these. You should read them.
  6. Digging one, and before next timeFree, three minutes, nothing installed.

Then the questions this always raises, the glossary so far, and the picture to photograph.

Before you start

  • Workshop #008 done, with a brief in your folder and something built from it.
  • A free Vercel account. vercel.com/signup — the hobby plan, no card. Sign in with GitHub or Google, whichever you prefer.
  • A list you keep somewhere awkward. A spreadsheet two people fight over, a notebook, a folder of text files. That is what today replaces.
  • Nothing to install — unless you want to. On the free browser route every lab today has a clicking route, and you can run the questions in the database’s own SQL console. If you let the assistant use the Vercel command-line tool it will need Node.js, and the setup page has it. Every lab today also has a route that works by clicking.
  • About an hour.

A database sounds like the expensive part and is not. Everything here runs on free plans that stay free at the size a small business works at. Lab 2 has a clicking route if you would rather not touch a command line, and a route that needs no account at all if you would rather not sign up for anything today.

01

Where does it actually live?

Every map you wrote last time ends at the same question.

Go back to the map you wrote in the last session and find heading two — the one that says where the information comes from. For most people in this room it says something like a folder, a spreadsheet, or, honestly, my head and a notebook in the truck.

For Dale it is a folder of text files that his daughter fills in each morning before she opens the office. That works. It has worked for months. It is worth being clear about that before we replace it with anything.

It stops working at four specific moments, and they are worth naming because you can usually feel one of them coming.

The four moments a folder gives out

1. Two people need it at once. His daughter is editing the file while Dale is reading it. One of them is looking at something that is no longer true, and neither of them knows which.

2. You want it somewhere else. On the phone, in the truck, at half past six. The folder is on the office computer, and the office is shut.

3. You ask a question of all of it at once. “What did we bill in July?” A folder cannot answer that. Somebody opens twelve files and adds up.

4. The same fact is written in two places. Tanner's address is in the email and on the estimate. He moves. Now one of them is wrong, and it is a coin toss which one you read next.

Number four is the one that quietly costs money, and it is the one this session is really about. Everything else follows from it.

A folder is a fine place to keep things. It is a poor place to keep the truth.

Lab 1 — Feel the problem before fixing it 10 min

Do not dig a well until you are thirsty. Ten minutes finding out whether you actually need one is worth more than an hour of setting one up.

Where does that list live right now?

Take the list you brought. If you did not bring one, the twenty customer rows in #002, chapter three will do — they are messy in all the usual ways. Write down honestly:

  • How many copies are there? Yours, the one on the shared drive, the one somebody emailed in March.
  • Which is right when two disagree? If the answer is “ask me”, that is the problem in one sentence.
  • What happens if two people edit it at once?
  • Could you answer “how many did we do last month” in under a minute?

If none of those hurt, you do not need a database

Genuinely. A folder of text files is a perfectly good answer for one person doing one job, and this workshop will still make sense read rather than done. The rest of the series does not depend on it.

Most small businesses are sold a database years before they need one. The tell is not size — it is two people, or two places, needing the same fact at the same time.

02

One well, many troughs

What a database is for — and, just as usefully, when you do not need one.

A well is one hole in the ground, dug once, in the right place. Around the yard there are troughs — one by the gate, one in the paddock, one in the barn. Every trough draws from the same well. Nobody carries buckets between them, and no trough ever has different water in it from another.

One well every fact, written down once the list on Dale's phone Friday's callback sheet the estimate app
Fig. 1 — One well, many troughs. Each trough shows the same water because there is only one well — nobody is carrying buckets between them.

That is a database. One place the information lives. Everything that needs it draws from there, and because there is only one of it, nothing can ever disagree with anything else.

The word people reach for first is “a big spreadsheet”, and it is close enough to start with. The difference that matters: a well is built to be drawn from by several things at once, from several places, without anyone waiting and without two people seeing different answers. A spreadsheet is one file, and one file has one person in it at a time.

Who is going to use it?

This is the question that decides whether you need a well at all, and it is worth asking out loud before anything else. There are three honest answers and they lead three different ways.

When a folder is still the right answer

Only you touch it. It fits on one screen. You have never once wished you could ask it a question. Nobody has ever had to ask which copy is current.

If that is you, keep the folder. Come back to this session on the day one of those four moments happens, because it will, and you will recognise it.

A well is dug once, in the right place. That is most of the skill.

Lab 2 — Dig the well 15 min

One command, and Vercel provisions a real Postgres database and puts the key in your project for you. There is no server to configure and nothing to keep running.

First, the account

Free, about three minutes, and no card asked for.

Every step of the Vercel signup, click by click
  1. Go to vercel.com and click Sign Up.
  2. Choose Hobby when it asks what you are doing. It is free and needs no card, and it is the right answer for learning this today. Vercel intend Hobby for personal projects rather than businesses, so once this is running your actual work, the paid plan is the honest answer — #010 has the detail.
  3. Sign in with GitHub if you made an account in #007. That is one fewer password, and it means the two already know about each other. Otherwise use your email.
  4. Give it a name when it asks. Your own name is fine. Nobody sees it but you until you decide otherwise.
  5. Skip anything about deploying a project. It will offer you templates and clever things. You need none of them today; close them down and you land on an empty dashboard, which is exactly right.

Vercel changes its wording and moves its buttons more often than this page gets reprinted. The shape does not change: sign up, choose Hobby, land on an empty dashboard.

Then ask the assistant to dig the well

You do not need to know the commands. Say what you want:

I want a small database for this project, on my free Vercel hobby account. Set one up through the Vercel marketplace rather than going to a database company directly, so it is billed and managed in one place. Use a free plan. Show me each command before you run it, and tell me plainly if anything is about to cost money.

What you should see happen

  • It checks whether the Vercel command-line tool is there, and installs it if not. That needs Node.js — the setup page has it.
  • It asks you to sign in, in a browser. Normal.
  • It creates the database and writes a connection string into a file called .env.local.

The one thing to be careful about

That connection string is the key to the well. Anyone holding it can read and change everything in there.

Make sure .env.local is in .gitignore so the key never gets committed. Then show me the .gitignore so I can see it myself.

This is the first workshop with a real secret in the folder. The habit to form now: keys live in .env.local, and .env.local never goes to GitHub. Check it yourself rather than taking anyone's word for it, including mine.

Or dig it from the dashboard, with no command line at all

Everything the assistant does below, you can do by clicking. Same well, same result.

  1. Open Integrations in the sidebar of your Vercel dashboard, then Browse Marketplace.
  2. Choose Neon from the list, click Install, and pick the free plan.
  3. Give it a name you will recognise in a month. my-first-well is a perfectly good name.
  4. That is it. The well exists, and it is empty. Lab 3 puts something in it.
  5. Find the connection string and look at it, so you know what one looks like. Then close the tab without copying it anywhere.

If you get stuck for more than ten minutes, stop. It is not you, and it is not worth an evening — send me a message and I will get you unstuck.

If you would rather not sign up for anything today

Ask for a file-based database instead. It needs no account, no internet and no key, and everything you learn about tables and rows carries over exactly.

Set up a local SQLite database in this folder instead of a hosted one. No accounts, no keys. Show me the file when it exists and explain what it is.

The difference is that it lives on your laptop, so it is one person and one machine — which is fine for learning and fine for plenty of real jobs.

03

Rows and columns is the whole idea

There is less to a database than people expect. That is the good news.

Here is the entire structure, and there is genuinely nothing hiding behind it. A table is a list of one kind of thing. Every one of those things gets a row. Every fact you keep about them gets a column, and every row has the same columns as every other.

customer job status waiting_on received Tanner Water heater, plus gas smell at stove stopped Dale — gas Aug 21 Brody Disposal jammed, toilet running stopped customer Aug 22 Alvarez Leaking trap under bathroom sink ready to price — Aug 24 Smith Kitchen faucet, corroded shut-offs sent — Jul 6 Columns: the same fact, kept about every job One row is one job and every fact about it sits on that line, once Change Tanner's address here and it is changed everywhere that draws from the well.
Fig. 2 — A table. One row per job, one column per fact. There is nothing more to it than that, and there does not need to be.

Dale's well has one table in it called jobs. One row per job. Seven columns, because there are seven facts worth keeping about a job. That is the whole design, and it took about four minutes to decide.

Two rules follow from the picture, and they are the only two you need today.

The columns you choose decide the questions you can ask

This is the part worth slowing down for, and it came out of building the demo you are about to see rather than out of a book.

Dale's table records the date a request came in. It does not record the date the estimate went out. Nobody noticed, because nobody had ever needed it. Then somebody asked what looks like the simplest question in the world — what did we bill in July? — and the well cannot answer it. It can tell you what came in during July and has since been billed, which is a different question wearing the same coat.

What it actually said, unprompted

“The table only records the day a request came in — there's no date for when it was sent out. So this is ‘jobs received in July that have been billed’, not ‘invoices sent in July’. If you want the two to line up going forward, we'd need a sent date column.”

Nobody asked it to check that. It is the single most useful sentence in this session.

So: a column you did not write down is a question you cannot ask. You will not get this right first time and you are not supposed to. Adding a column later is a small job. Knowing that you needed one is the hard part, and this is how you find out.

A column you never kept is a question you cannot ask.

Lab 3 — Put your real list in it 15 min

An empty database teaches nothing. Put the list you brought into it and it becomes obvious what rows and columns are actually for.

Describe the table in plain English

Here is the list I keep at the moment: [paste a dozen real rows, or attach the spreadsheet] Make a table for it. Work out sensible columns from what is actually there, and tell me what you chose and why before you create anything. If a column is nearly always empty, say so and ask whether it is worth keeping.

Read what it proposes before saying yes

This is the part worth slowing down for. It will suggest column names and types, and it will notice things you have been living with — a date column with three different formats in it, two rows that are the same customer spelled differently.

Then load the rows

Approve it, let it insert your real rows, and ask it to show you what is in there. Your list is now in a well rather than in a file, and nothing about that felt like database administration.

Notice you never wrote SQL. You described a list you already had, and answered questions about it.

04

Asking the well a question

You will not write these. You do need to be able to read one.

A question put to a well is called a query, and it is written in a language called SQL — most people say “sequel”. It has been around since the nineteen-seventies, which is why it looks the way it does, and it is not going anywhere.

“which jobs are still waiting on me?” What you say SELECT customer, job FROM jobs WHERE waiting_on ILIKE '%dale%'; What it writes read this line before you believe the answer customer waiting_on Tanner Dale — gas What comes back one row, and a reason
Fig. 3 — You will not write the middle box. You should be able to read it — it is the only place you can check that your question was understood.

You are not going to learn to write these, and you do not need to. What you need is to be able to look at one and check it asked what you meant — which is the same skill as reading the permission prompt in session five, and it matters for the same reason.

Read this one out loud in English and see how far you get:

One query, in two languages

SELECT customer, job FROM jobs WHERE waiting_on ILIKE '%dale%' ORDER BY received;

Select the customer and the job — show me these two facts.
From jobs — out of the jobs list.
Where waiting_on is something like “dale” — but only the ones with my name against them.
Order by received — oldest first.

Four lines, four ordinary English sentences. That is most of SQL, and the rest is more of the same.

Here is the real exchange from the demo, exactly as it came back.

Dale

Which jobs are still waiting on me?

The assistant

The SQL I ran:

SELECT customer, address, job, status, waiting_on, received, total FROM jobs WHERE waiting_on ILIKE '%dale%' ORDER BY received;

That asks for every job where the ball is with you, oldest first.

One job is waiting on you.

Tanner — 212 Wilbanks Rd, came in 21 August 2026. Water heater rumbling, plus a gas smell at the stove. Status is stopped, nothing billed yet.

It's flagged to you because of the gas smell — that's gas work, so I haven't priced any of it and won't. No date promised to the customer.

For context, nothing else is sitting with anyone else except one job waiting on the customer (a model number and an address); the rest are one ready to price and four already sent.

Notice what happened in the third line of that query. It searched for anything like “dale”, because it did not know how Dale's name was written in that column — and it said so. In an earlier run it refused to guess at all, and told me a filter that guessed wrong would quietly hide jobs. That is the behaviour you want, and it is the reason to read the query rather than only the answer.

Read the question. The answer will always look confident.

Lab 4 — Ask the well a question 15 min

This is the payoff, and it is the thing a spreadsheet cannot do for you at half past six on a Friday.

Ask in English

One at a time, in your own words:

How many did we do last month?
Who has not been back in over a year?
What was the average value, by month, for this year?

Always ask it to show its working

Show me the query you ran, and explain in one sentence what it does.

You do not need to understand the query. You need to be able to see that one exists, and to hand it to somebody who does understand it on the day that matters.

Now the important one

Ask something the data cannot answer. Something that needs a fact you never recorded — how many were sent, who referred them, how long each took.

A good answer tells you plainly that the column does not exist and asks whether you want to start recording it. A bad answer invents a number. Find out which you have got, today, on a question where you already know the truth.

The most useful thing a well does is not answering. It is telling you which questions you cannot answer yet — and that is a list of small changes worth making now rather than in a year.

05

Renting a well, and looking after the key

Renting a well, and the one line of writing that decides everything after it.

You do not dig a well by hand any more, and you certainly do not run one yourself. You rent one. It is free at the size any of us will use today, it lives on the internet rather than on your office computer, and getting one takes about as long as making a cup of tea.

There are several companies who will do this. We use Neon, and we get it through Vercel — which is worth explaining, because it saves you an account.

Vercel is a company that runs computers so you do not have to. You will meet it properly in #010, where it is what puts your work on the internet. It also has a marketplace of the things you tend to need on the way, and a database is one of them.

So you sign up once, at Vercel, and get the well from there. One account instead of two, one bill instead of two — and both are free at this size. The account you make today is the same one you use for the next three workshops.

The key to the well

Digging the well hands you back a connection string — one line of text beginning postgresql://. Anyone who has it can read and change everything in your well, from anywhere, with no password prompt. It is worth reading that sentence twice, because it is the first real secret you have owned.

So: it never goes in a public repository, it never gets pasted into a chat window or an email, and it never appears in a screenshot. It lives in a file called .env.local in your project folder, and the first thing you do is add that filename to .gitignore — which is Lab 2, and is the reason that lab makes you check it yourself.

If one does get out, go back to the Vercel dashboard, open the well in Neon from there, and reset the password. It takes a minute. Everything using the old one stops working until you update it, which is annoying and enormously better than the alternative.

Before you close this page

The four labs are the doing. These three are the thinking, and they are what decides whether the next thing you build takes an afternoon or a fortnight.

  1. Take out the brief you wrote in #008 and read heading two again — where the information comes from.
  2. Answer the question from chapter two, in writing, on the map: who is going to use this? Just you, you and your staff, or your customers? One line. It changes everything that comes after it.
  3. Then sketch the columns. What is the one kind of thing you are keeping — jobs, customers, deliveries? And what facts do you keep about each one? A list on paper is exactly enough.
If any of that goes sideways

Everything from every session is at github.com/brainit-consulting/ai-workshops — pick end-of-009 from the dropdown for the table Dale's well was built from.

And if the account or the well is where you get stuck, or you simply have a business to run and no evening to spend on this: that is what I am here for. Getting somebody unstuck takes minutes, and I would rather do that than have you decide the whole thing is not for you.

The middle one is the one to actually do. It is a single line of writing, and everything after it — who can see what, what has to be locked, how much of #012 you need at all — follows from the answer.

06

Questions people actually ask

Six that come up every time this session is taught.

Is this not just a big spreadsheet?

A bucket is not a well, however big the bucket.

It is close enough to picture, and it is a good place to start from. Two real differences: several things can draw from a well at the same moment without waiting or disagreeing, and a well can be asked questions of all of it at once. A spreadsheet is a file, and a file has one person in it at a time.

Do I need to learn SQL?

You do not need to dig to drink. You do need to look in the bucket.

No. You need to be able to read four lines of it and say whether it asked what you meant. That is a twenty-minute skill and it is worth having, because the answer that comes back will look equally confident whether the question was right or wrong.

What does it cost?

Free until the herd gets big.

Nothing, at the size anybody in this room will use. Free tiers on both Vercel and Neon are generous, and no card is asked for. If you ever outgrow it, you will have a business that can afford the bill and it will be about the price of a phone contract.

Is my information safe out there on the internet?

A well with a lid beats a bucket left in the yard.

Safer than the office computer, honestly — it is backed up, it is patched, and it does not get stolen out of a truck. The weak point is not the well; it is the key. Guard the connection string and you have done the large majority of it. And keep anything you would not want in the newspaper out of it until you know more.

What happens to my folder of files?

The old trough stays where it is until the new one holds water.

Nothing, yet. You do not move anything today. When you do move, you move one kind of thing at a time and you keep the folder until you have stopped needing it — which, with markers from session seven behind you, costs nothing to do carefully.

What if I get the columns wrong?

You will. Wells get deepened.

Everybody does, and adding a column later is a small job. The thing that stings is not a missing column — it is the same fact written in two places, which is why chapter three spends its time there rather than on getting the list perfect.

Plain words

Everything the series has named so far. Today's are marked.

This list grows every session and always shows the lot, so you never need last week's notes to read this week's.

Large language model (LLM) 001
The engine that predicts the next word. The horse.
GPT 001
Generative — it makes new text rather than looking up a stored answer. Pre-trained — all its learning happened in advance. Transformer — the design of the machinery underneath. A breed name, not a job title.
Knowledge cutoff 001
The date its training stopped. It knows nothing after it, and doesn't know that it doesn't. The last day the horse was out in the world.
Prompt 001
What you type. A pull on the reins.
Chatbot 001
A model you can talk to, turn by turn. Horse plus bridle.
System prompt / instructions 001
Standing orders sent with every message, whether you type them or not. The saddle.
Context window 001
How much of the conversation it can hold at once. How far it can see on this ride.
Token 001
A chunk of a word — how length is counted, and how you're billed. Sugar cubes.
Hallucination 001
Making something up and sounding certain. Shying at a shed snakeskin.
Tool 002
A specific action it's allowed to take in the real world. A saddlebag.
MCP 002
An agreed standard for plugging tools into a model. Standard-size buckles.
Agent 002
A model given a goal, tools, and permission to keep going. A working horse, not a show pony.
Agentic loop 002
Look, decide, act, check, repeat. The ride itself.
Human in the loop 002
A person approves before something real happens. A hand on the reins.
Automation 002
The same work happening without you starting it each time. The horse knows the route.
File 003
A thing with a name and contents. A single piece of gear.
Folder (directory) 003
A box holding files, and sometimes other folders. A shelf.
Project 003
One folder holding one job's worth of everything. The room, with the door shut.
Path 003
The written address of a file — which boxes it sits inside. Directions to the shelf.
Editor (VS Code) 004
A window showing you one folder and everything in it. The tack room.
Terminal 004
A panel where you type an instruction to the computer directly. Talking to the stable itself.
Install 004
Putting a program on your own machine, once. Building the room.
Permission prompt 005
The stop before it changes anything, showing what it plans to do. The gate, and your hand on the latch.
Approval mode 005
Whether it asks every time, works on its own, or only shows a plan. How loose you're holding the reins.
Interrupting 005
Stopping it mid-job with the escape key. A pull on the reins. Ordinary.
Project instructions 006
A plain-English file of standing rules that lives in the folder. The saddle, hanging in the room.
Run a command 006
Doing something on the computer rather than writing words about it. Actual work, not conversation.
Working on copies 006
Duplicating a file so the original can't be harmed. Schooling in the paddock, not on the road.
Version control 007
Keeping every previous version of everything, so any of them can come back. A trail you can ride back.
Git 007
The program that keeps the trail. It runs on your own machine. What drives the markers in.
Commit 007
One marker, with a short note saying what you had just done. A gate you can ride back through.
Repository (repo) 007
A folder that keeps its own history. The field, with the trail marked in it.
GitHub 007
A copy of the repository kept online — a real backup, and a way to hand it to somebody. The shared stable at the trailhead.
Push and pull 007
Sending your markers up to that copy, and fetching down anything that is there and not here. Riding to the trailhead and back.
Spec (brief) 008
One page describing a job well enough to hand it over. What it must do — not how to build it. The trail map. Where you are going, not which foot the horse leads with.
Scope 008
What is in this job, and what is deliberately not. Where the map stops. The country past the edge is not today's ride.
Acceptance 008
How you will know the thing is right when you see it. How you know you arrived.
Plan mode 008
A setting where it works out what it would do, and shows you, before touching anything. Reading the map aloud before anyone mounts up.
Assumption 008
Something you took to be true and never checked. A stretch of map you drew from memory rather than from riding it.
Database 009
One place the information lives, built to be read and written by several things at once without ever disagreeing with itself. The well.
Table 009
A list of one kind of thing, with the same facts recorded about each one. One list on the slate: every job, every time.
Row 009
One of the things. One job, one customer, one invoice. A single line on the slate.
Column 009
One fact, kept about every row. Customer. Status. Date received. The same question asked of every line.
Query (SQL) 009
A written question put to the database. SQL is the language they are written in. Lowering the bucket, and what you asked it to bring up.
Connection string 009
One line of text that says where the well is and unlocks it. Treat it as a key, because it is one. The key to the pump house.
Postgres (Neon) 009
The most widely used serious database; Neon is a service that runs one for you. A well somebody else dug, and maintains.
★

Everything on one page

If you photograph one thing today, photograph this.

1 · One well

Every fact written down once, in one place.

2 · Rows and columns

One row per thing. One column per fact. That is all of it.

3 · Read the question

You will not write the SQL. Check that it asked what you meant.

Next session

4 · Taking the wagon to market

Nobody buys from your barn. Putting it on the internet.

The question that decides everything: who is going to use this? Just you — keep your folder. You and your staff — dig a well. Your customers, with logins — that is a bigger job, and worth planning before you start rather than after.

Next session

#010 — Taking the Wagon to Market

You have a horse, a map, an undo and now a well. Everything you have built so far lives on your own machine, where precisely one person can see it — you. Next time we put something on the internet: a real address, that a customer could type in, that works when your laptop is shut. It is the session where the thing you have been making stops being a thing you have been making.

Before you start it: have the free Vercel account from today, and think of one thing you would want a customer to be able to see.

Want someone to hold the reins with you?

I do this for a living, and love to help people.

Thirty-plus years in enterprise software and a computer science degree — which mostly means I have watched a great many horses bolt, and I can usually tell you which ones are worth saddling before you spend money on the saddle.

01

In person

Your team, your room, your actual work on the whiteboard instead of somebody else's examples.

02

Over video

The same session, at your desks, with fewer chairs to stack afterwards.

03

Built for real

When the idea survives the workshop and somebody has to go and build the thing — that part I do too.

Fun fact — I rode to school on horseback as a kid in South Africa. So the metaphor isn't borrowed. I've done the falling off in person.

Emile du Toit brainitconsulting.com

Workshop #009 · The Well

© 2026 Emile du Toit, BrainIT Consulting · Print it, share it, leave my name on it.