Databases are used to store large amounts of data, organised into tables.

Table 1 shows some rows of an example table, called Students.

Table 1

StudentID FirstName LastName DateOfBirth
1225 William Smith 15/04/2009
1226 Sid Chopra 04/11/2008
1227 Freddie Brown 28/01/2009
1228 William Jones 13/09/2008

Tables are the basis of databases. The columns of a table (StudentID, FirstName, LastName, DateOfBirth) are called fields, and the rows are called records.

Each table have a table name, and each field has a field name. Each record can usually be identified by a primary key.

The primary key of a table is a field (column) which can uniquely identify each record.

This means that each record has a different value in the primary key field. In Table 1, the primary key is the StudentID field. The primary key will usually be the first column in the table.


Fields in tables have their own data type, which work just like normal programming languages. The main data types are:

(See also: 2.02 - Data Types)



What would the data types be for each field in Table 1?

StudentID - Integer
FirstName - Varchar
LastName - Varchar
DateOfBirth - Date