← Module 05 · Database & SQL
MODULE 05 · DATABASE & SQL

Table

A table is a structured collection of related records organized into rows and columns.

01 · What is it?

A table is a structured collection of related records organized into rows and columns.

A table usually represents one entity or one category of related data. For example, a users table stores users, and an orders table stores orders.

Simple idea: one table keeps one kind of record in a predictable shape.

02 · Think of it like...

Think of a spreadsheet tab made for one kind of thing. The column headings name the details, and each horizontal line holds one complete record.

Table

The whole organized set of related records.

Row

One complete record, such as one user.

Column

One named kind of information, such as email.

Field value

The actual value at one row and one column.

In a Users table, Rebecca is a field value in the name column of one row.

03 · What does it do?

A database table defines how related records can be stored, checked, found, and connected.

Columns

Names describe what information each record can contain.

Data types

Rules say whether a value is text, a number, a date, or another type.

Keys & constraints

Keys identify or connect records, while constraints protect data quality.

Relationships

References can connect records in this table to records in another table.

04 · Where is it used?

Tables are used anywhere an application needs to manage many related records.

Users

One row for each account.

Customers

Contact details and preferences.

Orders

Purchases and their status.

Products

Names, prices, and stock details.

Inventory

Quantities available at each location.

05 · Example

Here is a real-looking users table. The header row names the columns. Each line below it is one row, or one user record.

Users
idnameemailcreated_at
1Rebeccarebecca@example.com2026-09-10
2Alexalex@example.com2026-09-10

Read one cell: in the first row, Rebecca is the field value for the name column. The full row describes one user.

CREATE TABLE users (
  id INTEGER PRIMARY KEY,
  name TEXT NOT NULL,
  email TEXT NOT NULL UNIQUE,
  created_at DATE NOT NULL
);

This SQL defines the table’s columns, data types, primary key, and constraints. The stored rows then follow that shape.

06 · How it connects

Database
Table
Row + Column
Schema
Primary Key
Foreign Key
SQL

The database contains tables. A table contains rows and columns. Its schema defines the rules, keys connect the data, and SQL is used to work with it.

09 · What to Remember

A table represents one entity or category of related data.

Rows are records, columns describe the records, and each cell holds a field value.

A table’s schema, keys, constraints, and relationships help keep data useful and connected.

↑