Skip to content

What Is a Database? Tables, Rows and Columns

Programming SQL Difficulty 1/5

Beginning of the lesson

What Is a Database? Tables, Rows and Columns

Where computers keep information tidy, safe and easy to find

Big Idea: A database is an organised place to store information so a computer can find it, add to it and change it quickly. Most databases keep data in tables made of rows and columns - just like a neat sheet of squared paper.
By the end you will be able to:
  • explain what a database is and why it is useful,
  • name the three building blocks: table, row and column,
  • say why databases beat spreadsheets and loose files,
  • describe what a DBMS is and name a few (MySQL, PostgreSQL, SQLite),
  • explain how SQL is the language we use to talk to a database.

1. What is a database?

Think about your school. Someone has to remember the name of every student, which class they are in, and how old they are. If there are 500 students, keeping all of that in your head is impossible. You need a place to store the facts and a fast way to find them again.

A database is exactly that place. It is an organised collection of information (we call the pieces of information data) that lives inside a computer. Because it is organised, the computer can answer questions like "Which students are in grade 7?" in the blink of an eye.

An everyday picture: imagine a huge library. Books are not thrown in a pile on the floor - they sit on labelled shelves, sorted so you can walk straight to the one you want. A database is the library for a computer's information: everything has a place, and a place for everything.

2. Tables, rows and columns

The most common kind of database is the relational database. It stores data in tables. A table looks like a grid on squared paper:

  • A table holds one kind of thing. A students table holds students; a books table holds books.
  • A column is one piece of information that every item has - for students that might be name, grade or city. Columns run up and down.
  • A row (also called a record) is one single item - one whole student, with a value in every column. Rows run left to right.
  • A cell is where one row meets one column: a single value, such as the name "Aida".
id name grade city 1Aida7Bishkek 2Bekzat8Osh 3Chris7Almaty a COLUMN (runs down) a ROW one CELL = the value "Bekzat" the whole grid is a TABLE named "students"
Columns run down, rows run across, and a cell is one value where a row meets a column.

A handy way to remember it: columns are the kinds of facts, and each row is one thing that has all of those facts filled in.

Continue this lesson on YourAIZone

The full lesson has the complete explanation, worked examples, common mistakes, tests with instant checking and an AI tutor. Start right away as a guest, or create an account to keep your progress.

In the full lesson

  • The complete explanation
  • Worked examples
  • Common mistakes and how to avoid them
  • Test questions: 15
  • AI tutor that answers questions about the topic
  • Progress tracking for students, parents and teachers