Choose exam board for KS4 Computer Science (GCSE)
Choose exam board for KS4 English
Choose exam board for KS4 French
Choose exam board for KS4 Geography
Choose exam board for KS4 German
Choose exam board for KS4 History
Choose tier for KS4 Maths
Choose exam board for KS4 Music
Choose exam board for KS4 Physical education (GCSE)
Choose exam board for KS4 Religious education (GCSE)
Choose exam board for KS4 Spanish

      Lesson details

      Learning outcome

      I can create SQL queries to insert and update data stored in a database.

      Key learning points

      1. SQL stands for Structured Query Language. It is a language used to communicate with a database.
      2. You can use SQL to manipulate databases and retrieve records.
      3. An SQL INSERT statement allows you to add data into pre-existing tables.
      4. An SQL UPDATE statement allows you to modify records.
      5. Existing records can be deleted from a table by using an SQL DELETE statement.

      Keywords

      • SQL - Structured Query Language: declarative language designed for managing data held in a relational database management system

      • INSERT - an SQL INSERT statement allows you to add data into pre-existing tables

      • UPDATE - an SQL UPDATE statement allows you to modify records

      Common misconception

      You can delete data from a database using an SQL command without any consideration.

      You should delete data using SQL commands carefully as data may be linked to other tables in the database.

      Teacher tip

      This lesson can be completed without using a DBMS, but pupils could complete the activities practically using MySQL.

      Equipment

      Pupils will need access to a device that can open a relational database and run SQL queries. Examples in this lesson use a database created using DB Browser for SQLite https://oak.link/sqlite

      File needed for this lesson

      dbMusic 120 KB (DB)

      Download this file to use in the lesson.

      Licence

      This content is © Oak National Academy Limited (2026), licensed on Open Government Licence version 3.0
      except where otherwise stated. See Oak's terms & conditions
      (Collection 2).

      Lesson video

      Loading...

      Prior knowledge starter quiz

      6 Questions

      Q1.
      Which of the following best describes an entity in a database context?

      A type of software
      A computer virus
      A password
      Correct answer: Something data is stored about

      Q2.
      Which role is responsible for maintaining databases using a DBMS?

      Correct answer: Database administrator
      Receptionist
      Graphic designer
      Athlete

      Q3.
      What does an ERD help you to do?

      Play music
      Print documents
      Correct answer: See relationships between entities
      Format tables

      Q4.
      Which of these is NOT a function of a DBMS?

      Maintaining data security
      Storing data
      Allowing data to be queried
      Correct answer: Drawing entity-relationship diagrams automatically

      Q5.
      Arrange these from most general to most specific:

      1 - Database
      2 - Table
      3 - Entity
      4 - Field

      Q6.
      Match each database term to its correct description:

      Correct Answer:Database,A collection of related data stored together, made up of tables

      A collection of related data stored together, made up of tables

      Correct Answer:Table,A set of data arranged in rows and columns within a database

      A set of data arranged in rows and columns within a database

      Correct Answer:Query,A request to search for or retrieve specific information from data

      A request to search for or retrieve specific information from data

      Correct Answer:Field,A single category of data within a table, such as “Name”

      A single category of data within a table, such as “Name”

      6 Questions

      Q1.
      What does SQL stand for?

      Correct Answer: Structured Query Language

      Q2.
      Which SQL statement is used to add new data to a table?

      UPDATE
      DELETE
      SELECT
      Correct answer: INSERT

      Q3.
      What is the main purpose of the SQL UPDATE statement?

      Add a new table
      Correct answer: Change existing data
      Remove a table
      Create a database

      Q4.
      Why should you be careful when deleting data using SQL?

      Correct answer: Data may be linked to other tables
      It can make your computer slow
      It’s illegal
      It changes the table’s name

      Q5.
      Match the example to the SQL statement used:

      Correct Answer:Add a new row to a table,INSERT

      INSERT

      Correct Answer:Change a student’s email address,UPDATE

      UPDATE

      Correct Answer:Remove a record for a student who left,DELETE

      DELETE

      Correct Answer:Show all students with a grade above 80,SELECT

      SELECT

      Q6.
      What might happen if you delete a record without checking for links?

      Correct answer: You might break relationships with other tables
      Nothing will change
      The table will be deleted
      The database will become faster

      To help you plan your 11 computer science lesson on: SQL fundamentals, download all teaching resources for free and adapt to suit your pupils' needs...