ISF DP Computer Science

Intro to SQL #

This lab introduces Structured Query Language (SQL).


Syllabus Topics [SL] #

  • A3.3.1 Outline the differences between data language types within SQL.
  • A3.3.2 Construct queries between two tables in SQL.
  • A3.3.3 Explain how SQL can be used to update data in a database.

Syllabus Topics [HL] #

  • A3.3.4 Construct calculations within a database using SQL’s aggregate functions. (HL only)

Key Vocabulary #

WordDefinition
SQLStructured Query Language
Databasean organized collection of structured information that can be accessed in different ways
Tablea structure of rows and columns for storing a group of similar data
Fieldthe column name
Data Language Typeslanguages used to interact with databases
Data Definition Language (DDL)language that is used to create, modify, and remove data structures from a database
Data Manipulation Language Language (DML)language that is used to add, modify, delete, and retrieve data stored in databases
Queryto request information from a database
Relational Operators=, >, <, !=, <=, >=, between, in, like, %, IS NULL
Filteringusing WHERE
Pattern Matchingusing like, %, _

[0] Learn SQL #

SQL allows you to interact with databases that store tables of information.

💻 Learn SQL at sqlbolt.com


👾 💬 Commands you must know

SL must know the following commands. Although AVERAGE, COUNT, MAX, MIN, SUM are not mentioned, they are often used in conjunction with GROUP BY. So, we recommend learning all of the commands.

SELECT, DISTINCT, FROM, WHERE, BETWEEN, ORDER BY, GROUP BY, HAVING, ASC,
DESC, JOIN, LIKE with % wildcard, AND, OR, NOT

INSERT INTO, UPDATE SET, DELETE

HL must know the following additional commands

AVERAGE, COUNT, MAX, MIN, SUM


[1] SQL Murder Mysteries #

1️⃣🔍💻 Go to sqlnoir.com and create an account. Solve one mystery from each level.

2️⃣🔍💻 Solve a longer mystery at mystery.knightlab.com. Be sure to try the bonus question at the end.


[2] Deliverables #

⚡✨ Once you finish the lab, be sure to complete these two steps:

📋 Update Syllabus Checklist: Go to your Syllabus Content Checklist in your Google Drive and update it accordingly.