Lab Experiment 2: Database Table creation,

Maintenance & Views

2.3: Preparation

(1)

The primary key of a table is a column (or combination of columns in a table) that are used to uniquely identify rows in a table. This means that two different rows in a table may never have the same value in their primary key, and for every row in the table the primary key must have a value.

Therefore, if the primary key column(s) are declared NULL, two or more rows in the primary key can have identical values and thus they will NOT be unique. Also the definition of the primary key states that a primary key must have a value and by declaring it NULL, the user has an option of leaving it empty, which is violating the primary key’s rules.  

Join now!

The primary key column(s) must be declared NOT NULL, to maintain the integrity of data which is entered in the primary key column.

A NULL values is treated by mathematically operators, such as average, like any numeric value. These functions operate on the NULL without any problem, but produce an answer which has a value NULL.

(4)

The following are the entities that will be tested for normalisation, using the 1NF, 2NF and 3NF:

SUPPLIER (CODE, NAME, CONTACT, ADDRESS 1, ADDRESS 2, POST CODE, TOWN, PHONE, FAX).

INVENTORY (ITEM_CODE, STORE_LOCATION, QUANTITY).

1st Normalisation Form (1NF) ...

This is a preview of the whole essay