Database tables

In a relational database, all data is contained in tables, which are made up of rows and columns.

Each table has one or more columns, and each column is assigned a specific data type, such as an integer number, a sequence of characters (for text), or a date. Each row in the table has at most one value for each column.Where there is no value for a particular row and column, we sometimes say that the value is NULL, which may be interpreted as not currently known, or not applicable, or not yet available.

An example of a table containing employee information may appear as follows:

emp_ID

emp_lname

emp_fname

emp_phone

10057

Huong

Zhang

1096

10693

Donaldson

Anne

7821

Characteristics of relational tables

The tables of a relational database have some important characteristics:

.

The following table lists some of the formal and informal relational database terms describing tables and their contents, together with their equivalent term in other nonrelational databases. This manual uses the informal terms.

Formal relational term

Informal relational term

Equivalent nonrelational term

Relation

Table

File

Attribute

Column

Field

Tuple

Row

Record

What do you keep in each table?

When you are designing your database, you should make sure that each table in the database holds information about a specific thing, such as employees, products, or customers.

A relational database is not a set of unrelated tables. You can use primary and foreign keys to describe relationships between the information in different tables.