Chapter 13 Databases

A Database is a structured collection of data that allows people to extract information in a way that meets their needs. The data can include text,numbers, pictures : anything that can be stored in a computer. Using a database is beneficial since it records and stores all the data, there isn’t data duplication. Also the same data is used by everyone and if there are any changed to be done, they can be easily done once.

Databases are used by people or organisations such as:

  • patients in a hospital
  • Students at a school
  • cars to be sold
  • books in a library
  • hotel bookings
  • results of races
  • and many more things

Inside a database, data is stored in Tables, which consist of many Records and each record consists number of Fields.



database record and field

In order to be sure that each record can be found easily and to prevent more than one copy of the same record being kept, each record includes a Primary Key field. Each Primary Key field in the table is unique.  The primary key can be a field that is already used,provided it is unique, for example the ISBN in the book table, or a new field added to each record , for example, a unique hospital number could be added to each hospital patients record. Sometimes, a primary key can be formed by using two or more existing fields for example the doctors appointments could have a primary key made from the date and the time of each appointment.

A foreign key is a field (or collection of fields) in one table that uniquely identifies a row of another table or the same table.

For making a database, we use Microsoft Access

Validation: Validation is an automatic computer check to ensure that the data entered is sensible and reasonable. However it does not check the accuracy of data.


  • Data – raw facts of figures
  • Table – a structure in which data is stored
  • Flat – file database – a single table database
  • Record – a collection of data about a single item
  • Field – one piece of data
  • Primary key – a unique identifier for each record
  • Index – a list of values or items
  • Relational database – a database with several tables linked by primary key fields
  • Foreign key – a primary key that appears in another table
  • Query – a method of searching a database
  • Range – Start/End
  • Presence – checks if the data is entered in a specific field or not