Data+structure

Rules
Relational databases must stick to the following rules:

1. Each table in the database must be identified by a unique name 2. Each column in a table must be identified by a unique name within that table 3. The data in each column of a table is same domain and type 4. Each row in a table is unique 5. Each cell in a table contains one value only 6. Rows and columns in a table can be in any order

Columns


See rule 2 above - column names within a table must have a unique name. There can only be one column named forename. See rule 3 above - data in each column must be of the same domain and data type. See rule 6 above - we can swap the order of the columns without having any impact on the data in the database.

Rows


See rule 4 above - data in each row of a table must be unique. There can be 2 Richie Grays born on 19/05/1998 but they would both have a different Pupil ID See rule 5 above - each cell in a table can only contain one value. Richie Gray can have only one Pupil ID, one Forename, one Surname and one DOB. See rule 6 above - we can swap the order of the cells without having any impact on the data in the database.

Atomic data
Data items are said to be atomic if they cannot be broken down into smaller data items.

In this example, Forename and Surname fields are atomic because they cannot be broken down into smaller data items
 * Example 1 - Atomic Fields**

In this example, the Pupil Name field is not atomic because it could be broken down into fields - Forename and Surname
 * Example 2 - Non-atomic Fields**