Databases and SQL
Watch the whole lecture free
Make a free account to watch every lecture to the end: 7 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.
That was the teaching part. The rest of this lecture is free with an account: 7 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.
No password needed now: we email you a link to set one. Already have an account? Sign in, then come back to this page.
The teaching part (1 min) is free to watch. A free account opens the whole lecture: 7 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.
What this lecture covers
- Finding one book in a thousand
- What is a database?
- The library table
Read the transcript of the teaching part
Last time
Before we start: last time, in Data types, variables, constants and operators, you learned these points. Here they are again on one card. Keep them in mind, because today builds on them.
Finding one book in a thousand
A library holds thousands of books. On paper, finding every mystery novel by one author would take hours. In a database, a short query does it in a moment. In this lesson we learn how a database table is built, and how to ask it questions using SQL.
What is a database?
A database is an organised collection of related data that can be searched, sorted and updated. A table holds the data about one type of thing, in rows and columns. A record is all the data about one item, and it is one row. A field is one piece of data about every item, and it is one column.
The library table
We will use this table throughout. It has eight fields, the columns, from BookID to DateAdded. It has eight records, the rows. The heading row is not a record. BookID is the primary key.
How often it comes up
The whole chapter: Databases.
Chapter 9: Databases and SQL
- Databases and SQL 7 min
Also for IGCSE Computer Science 0478
Which topics come up most in IGCSE Computer Science 0478 past papers, counted from every paper since 2004: Paper 1 topic frequency, Paper 2 topic frequency.