CP363 : Relations (Cont'd)

A domain is a set of atomic values. An atomic value is a value that is indivisible; i.e. it cannot be broken down into smaller values. This depends partly on how the value is to be used. A Name attribute (ex: "David B. Brown") may be considered atomic if only the entire name value is used. However a Name could be broken down into Surname, Forename, and Initial should there be a use for the individual attributes. On the other hand a student ID would be irreducibly atomic in that it cannot be broken down further.

If an attribute is multivalued it should be represented by separate relations. Thus if a Supervisor has many Employees this information cannot be stored in a single table because Employees is multivalued. The relationship between the two must be broken up into at least two tables.

Keys and Key Constraints

Generally all tuples in a relation should be distinct

Key constraints between tables are called referential integrity constraints.


Data Definition Language (DDL)

Data Manipulation Language (DML)

SQL (Structured Query Language) is used as both a DDL and a DML.


A referential key constraint can protect data in one table from deletions or updates in another table.

A referential key constraint can also make deletions and updates easier.

The database designer must choose whether a particular relation rejects or cascades deletions and updates.