DatabasesRunning queries

Databases are involved with everything we do online. From social networking to the BBC website, databases are crucial tools used to store large amounts of data in an organised way.

Part ofICTData and databases

Running queries

Databases can hold huge amounts of . Queries find specific data based on set .

Query scenario

A burglary has happened in a local village. The police create a query to search their database for suspects. The fields queried are:

  • first name
  • last name
  • known for

The table queried is ‘Criminals’. The results return a list of first names and last names and the crimes each individual is known for. One man is known for burglary.

Narrowing down the results

The police add the field ‘In prison’ to the query and add search criteria so that it only returns people currently in prison. The man comes up as a result, so he cannot have committed the crime because the police know he was in prison.

Results of a crime report query

More guides on this topic