HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Learning Paths
  2. /Databases and SQL
Computer Science
High School (9–10)
Computer Science › Databases and SQLChapter 9

Databases and SQL

A school keeps a list of every student, a library keeps a list of every book, and a shop keeps a list of everything it sells.

  • Each list is a table in a database.
  • In this chapter you design a table: you choose its fields, a data type for each field, a primary key and the validation the data needs.
  • Then you write SQL scripts that pick out records, sort them, count them and add them up, and you work out exactly what a script will output.
  • Every query runs in Python on the page, so you can check each answer yourself.

Part of Computer Science · IGCSE (9–10) (chapter 9)

StemPy LabStemPy Lab
Log in to save

Following adds this path to your dashboard and enrolls you in the 3 courses you can open, so you can start right away.

Courses in This Path (3)

1.
Database Tables, Data Types and Primary Keys
A class register has a row for each student and a column for each detail, such as the name or the date of birth. That is a database table. You learn to define a table from what has to be stored, to name its fields and records, to choose a data type for each field and to pick a primary key. You also see how validation stops wrong data from getting into the table.
Not started
2.
SQL Queries: SELECT, WHERE and ORDER BY
How does a library find every book by one author, with the newest first? It asks its database a question written in SQL. You write SQL scripts with SELECT and FROM to choose the fields, WHERE to choose the records and ORDER BY to sort them in ascending or descending order. For each script you work out the exact output, and you run it in Python to check.
← All Learning Paths
More onComputer Science › Databases and SQL

Computer Science · IGCSE (9–10)

  1. 1Data Representation
  2. 2Data Transmission and Encryption
  3. 3Computer Hardware
  4. 4Software and Programming Languages
  5. 5The Internet and Cyber Security
Not started
3.
SQL: SUM, COUNT, AND, OR and Reading Query Output
How many tickets were sold on Saturday, and how much money did they bring in? SQL can answer both in one line each. You use COUNT to count records and SUM to add up a field, and you join two conditions with AND or OR. Then you practise the examination skills: reading a script and giving its output, completing a script with missing parts, and finding the error in a script.
Not started
6
Automated and Emerging Technologies
  • 7Algorithms and Problem-Solving
  • 8Programming in Pseudocode and Python
  • 9Databases and SQLYou are here
  • 10Boolean Logic
  • The whole book →
    Computer Science
    Computer Science
    Computer Science