Chapter 5

Preview:

Citation preview

Chapter 5

Terminology

A table is made out of records, records are made out of fields and fields are made out of characters.

• The table (entity) must have a unique name• Each field (attribute) must have a unique name• Each record must be unique• Each field must only contain a single data item

A record is a single row within a table

A field is an individual item within a record. Each field within a record should have unique name. A field should only contain a single item of data.

A primary key allows a record in a table to be uniquely identified. Every value of the primary key must be unique – e.g. Student ID number, passport number, barcode, ISBN number etc. A simple key – is made up of a single field, e.g. student IDA composite primary key combines more than one field to make a unique value

A secondary key is a field that is considered suitable for indexing the data, It is used to sort the data in a different order to the primary key.

A foreign key is used to link tables together, a foreign key is a field in one table that is linked to a primary key in another table. The data types of the linked fields must be the same

Relationships and Entities

Chapter 5

Recommended