8. Primary Key

Imagine what would happen if Mrs Smith telephoned the school to ask the secretary to pass on a message to her daughter Charlotte.

If there were nothing to uniquely identify the students' records, the secretary would have to search for all of the 'Charlotte Smiths' in school and then say, 'sorry to keep you waiting Mrs Smith, could you just tell me if your daughter is in year 7, 8, 10, 11 or 13? And if she is in year 7, which one of these five girls is she?'

How about a patient going to have an operation. 'Oh hello Mr Jones, I have 4 Mr Joneses having an operation today, can you tell me if yours is to remove your tonsils, your arm, put your leg in a cast or give you a hair transplant?'. I think that would be one very worried patient!

Therefore, it is important that every single record in a database has something to uniquely identify it and this is called the 'Primary Key' or sometimes the 'Key Field'.

 

When you started school, you were given a 'student ID' or an 'office number' (primary key).

This enables all of the girls called Charlotte Smith to be recognised.

 

When patients go into hospital, they are given a patient number (primary key).

This means that any treatment can be recorded on their record and they will be given the right operation.

 

When you go into Argos to buy something, you look at the catalogue and write down the number of the item.

You take your order to the till and they enter the number (primary key) and check if there are any items in stock.

 

When bank customers want to deposit or withdraw money they have to provide their bank account number (primary key).

This enables the cashier to access their account details and process their request

 

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: Key Field

 

 

 

Copyright © www.teach-ict.com