Search Header Logo
AQA SQL L2

AQA SQL L2

Assessment

Presentation

Computers

10th Grade

Practice Problem

Easy

Created by

Roy Duguid

Used 3+ times

FREE Resource

18 Slides • 5 Questions

1

SQL L2

2

media

3

Recap Key Terms SQL

Replace this with your body text. Duplicate this text as many times as you would like. All provided templates can be reused multiple times. Wish you a good day.

Happy teaching!

4

Database Overview

A collection of information stored together in a structured and organised way

Databases are arranged using tables, records and fields

Each record has a fields that uniquely identifies (separates) that record from others. This is the primary key

media

5

Flat-file

  • Repeated data (duplication)

  • Greater chance for inaccuracy

  • Increases data entry time

  • Reduced data integrity (trust in data and query results)

  • Easy to create

media

6

Relational Database

  • Data stored and inputted once

  • Can setup access rights for individual tables

  • New tables or fields can be added without affecting other tables

  • Difficult to setup with specialised software required

media

7

Primary vs Foreign Key

  • Primary key is a field within a table that uniquely identifies each row

  • Foreign key is a field that references the primary key of another table

media

8

Multiple Choice

Question image

What is the table name?

1
Orders
2
Customers
3
Products
4
Invoices

9

Multiple Choice

Question image

What is the primary key?

1

country

2

first_name

3

Customers

4
customer_id

10

Multiple Choice

Question image

What is the foreign key of the table Orders?

1
customer_id
2
amount
3
item
4
order_id

11

Draw

Highlight 1 field

12

Draw

Highlight 1 record

13

The SQL INSERT INTO Statement

The INSERT INTO statement is used to insert new records in a table.


INSERT INTO Syntax It is possible to write the INSERT INTO statement in two ways.

The first way specifies both the column names and the values to be inserted

media

14

INSERT INTO Syntax

If you are adding values for all the columns of the table, you do not need to specify the column names in the SQL query. However, make sure the order of the values is in the same order as the columns in the table. The INSERT INTO syntax would be as follows:

media

15

media

16

media

17

Teams > Activity 1

18

The SQL DELETE Statement

The DELETE statement is used to delete existing records in a table.

19

​DELETE Syntax

​ DELETE FROM table_name WHERE condition;

20

​DELETE Syntax

​ DELETE FROM table_name WHERE condition;

media

21

Warning with ​DELETE

media

22

Warning with ​DELETE

media

23

Teams > Activity 2

SQL L2

Show answer

Auto Play

Slide 1 / 23

SLIDE