A collection of data or information which is held together in an organised or logical way.
A record is:
All of the data or information about one person or one thing.
A field is:
One piece of data or information about a person or thing.
Primary key:
The primary key is a field in a table which allows each record to be uniquely identified.
2 of 4
Types and processes within databases:
Flat-file database:
A database which contains only one table.
Data duplication:
Where data is unnecessarily repeated
Referential integrity:
Every foreign key value has a matching value in the corresponding primary key. Referential integrity uses these to ensure that there are no orphan records i.e. it prevents you from deleting related records.
Foreign key – customer ID in rentals table, primary key – customer ID in customer table
3 of 4
Components of Databases: (2)
Simple primary key:
A simple primary key is made up of a single field only e.g. customer number
Compound or composite primary key:
A compound / composite primary key combines more than one field to make a unique value. e.g. each card in a deck would be identified by its suit and its value – Ace of Hearts
Foreign key:
A foreign key is used to link tables together and create a relationship.It is a field in one table that is linked to the primary key in another table
Comments
No comments have yet been made