Once students understand databases and table structure, the next essential step in IB Computer Science is learning SQL. SQL is not about programming logic or algorithms — it is about asking precise questions of data.
IB examiners expect students to understand what SQL is, why it is used, and how it interacts with databases, even before writing complex queries.
What Is SQL?
SQL (Structured Query Language) is a standard language used to:
- Access data stored in databases
- Retrieve specific information
- Insert, update, and delete records
SQL is used with relational databases, where data is stored in tables made up of records and fields.
In IB Computer Science, SQL is treated as a data query language, not a general-purpose programming language.
Why SQL Is Used
Databases may store millions of records. SQL allows users to:
- Retrieve only the data they need
- Filter results
- Sort information
- Combine data from multiple tables
Without SQL, users would need to search data manually, which is impractical and inefficient.
IB exam questions often focus on SQL’s role in efficient data access.
How SQL Works with a Database
SQL works by sending queries to a database.
The process is:
- A query is written using SQL
- The database management system interprets the query
- The database searches the relevant tables
