Technology & Computing · Data & digital information

What a database is

See how tables, rows and keys organize records, how one SQL question pulls out an answer, why a spreadsheet stops being enough and when other kinds of database fit better.

4 short lessons · about 16 minutes · 11 sources · updated November 2026

What you will learn

  • Describe how a relational database organizes records into tables of rows and columns
  • Explain how a primary key identifies a row and a foreign key links two tables
  • Read a simple SQL query that picks columns, filters rows and sorts them
  • Explain how a join uses a key to combine rows from two tables

Lesson 1 of 4 · 4 min

Tables, rows and the keys that tie them together

Before you readA shop's database holds 500 orders from one loyal customer. How many times does a well-designed database store that customer's address?

Correct.Not quite. The answer is Once.

Just once. The lesson shows how tables and keys let every order point to a single copy.

Your bank balance, your seat on a train and the messages in your inbox all sit in databases. Most of them follow one idea from 1970, when Edgar Codd at IBM proposed keeping data in tables.

Before that, many databases stored records as chains. A program found data by following pointers from one record to the next, much like following arrows on a map. Codd wanted something you could simply search.

Say a small library keeps its records in a relational database. It has one table for members, one for books and one for loans. Each table holds one kind of thing.

Each row is one instance of that thing, such as one member. Each column is one detail, such as a name or a join date. Every row in a table has the same columns, and each column holds one type of data, such as dates or whole numbers.

Check yourselfIn a library database, what does one row of the members table hold?

Correct.Not quite. The answer is One member's details.

A row is one instance of the table's kind of thing. One detail for every member is a column.

Two members could both be called Ana Silva. So each row gets a primary key, a value no other row in the table shares. Often it's just a number made for the purpose, like member 1042.

Now the loans table doesn't copy Ana's name and address. Each loan row stores her member number and the book's number. A column that holds another table's primary key is called a foreign key, and it links the two tables.

This is why each fact can live in one place. If Ana moves, the database changes one row in the members table, and every loan still points to the right person.

Copy her address into every loan instead, and a move means updating dozens of rows. Miss one, and the database now holds two addresses for the same person, with no way to tell which is right.

Try to recallIn a library database, why does the loans table store a member's ID number instead of the member's name and address?

The ID is a foreign key that points to one row in the members table, where the name and address live. That way the address is stored once. If it changes, one row is updated and every loan stays correct, instead of copies drifting apart.

A relational database keeps each kind of thing in its own table, one row per item. Keys tie the tables together, so you can now explain why a change of address touches just one row.

Lessons in this topic

  1. Tables, rows and the keys that tie them together

    See how a database splits records into tables of rows and columns, and how keys let one table point to another so each fact is stored once.

    Essentials · 4 min

  2. How to ask a database a question in SQL

    Read a short SQL query that picks columns, filters rows and sorts them, and see how a join uses keys to combine two tables into one answer.

    Essentials · 4 min

  3. When a spreadsheet stops being enough

    See how a row limit in an old spreadsheet format lost thousands of test results in 2020, and what a database adds for many users and for rules about valid data.

    Deeper · 4 min

  4. Databases without tables, and when they fit

    Meet key-value stores, document stores and graph databases, see what each does well, and why tables still win for many jobs.

    Deeper · 4 min

Three quick stories from this topic

The 65,536-row limit

An old Excel file format left nearly 16,000 Covid cases out of England's figures in 2020

Public Health England loaded lab results into templates in the 1987 XLS format, which stops at 65,536 rows. Each result used several rows, so cases past about 1,400 a template were silently dropped.

What it cost

Between 25 September and 2 October 2020, 15,841 positive cases missed the daily figures, and tracing their contacts was delayed.

The fix

PHE split the data into more, smaller templates. The newer XLSX format holds 1,048,576 rows a sheet.

The first NoSQL

The first database called NoSQL, in 1998, still kept its data in relational tables

Carlo Strozzi gave the name to his small relational database because it didn't use the SQL language. The 2009 movement that borrowed the name dropped tables altogether.

His objection

Strozzi said the later movement left the relational model behind, so it should have been called NoREL.

What NoSQL means now

Key-value, document, graph and wide-column databases, often built to spread across many machines.

Why SQL lost its vowels

SQL was first called SEQUEL, until the name turned out to be a British company's trademark

IBM researchers Donald Chamberlin and Raymond Boyce named their query language SEQUEL in the 1970s. The name belonged to Hawker Siddeley Dynamics Engineering, so they dropped the vowels.

Still said both ways

The standard says the letters, S-Q-L. Many database people, Chamberlin included, still say "sequel".

Why it spread

IBM built products on it, Oracle sold one of the first versions in 1979, and it became a US standard in 1986.

Sources

  • How a database keeps records consistent

    See how transactions, built-in rules and isolation levels keep records right when a server crashes, two buyers want one seat or two updates collide.

    4 lessons · 17 min

  • Why one database query is fast and the next isn't

    See what an index does for a database search, which searches it can't help, and how to read the plan that shows whether the database used it.

    4 lessons · 25 min

  • Data compression

    See how a zip file squeezes out repetition, how JPEG and MP3 throw away what you won't notice, why busy video breaks into blocks and why no method can shrink every file.

    4 lessons · 16 min

  • How cookies let websites remember and track you

    A cookie is a small note a server asks your browser to keep and hand back. See why the web needs them, how one company can use them to follow you across sites, and what browsers do about it.

    4 lessons · 25 min

  • Social media

    See how social networks grew from friend lists into feeds of strangers' videos, why they cost nothing to use, why the leading app differs by country, and what experiments say about their effect on politics.

    4 lessons · 16 min

  • The parts of a computer

    Open up a laptop or a phone and name what you find. See what the processor, memory, storage and the input and output parts each do, and how they work together when you open a file.

    4 lessons · 16 min

All technology & computing topics · Take the quiz