How tables, rows, and columns work

Picture a table

A table represents one kind of thing, such as customers. Each row is one customer, and each column records one attribute shared by those rows.

Name each part

  • A table has a unique name within its database or schema
  • A row is one record
  • A column has a name and declared type
  • A cell is the value at one row and column

Read a sample

This result has three columns and two rows. The first row describes Ada.

id | name | city
1  | Ada  | Nairobi
2  | Lin  | Accra

Keep subjects separate

Store different subjects in separate tables—for example, customers and orders—then connect them with keys. This avoids repeating customer details in every order.