With data comes the need for a system that is able to store, sort, and search through it.
A database is an organised collection of data.
Databases can be as simple as a single file, and as complex as a set of related tables, each with fields and keys.
Keywords
record
a data structure that stores related fields of data for a single object or being
field
the part of a record which are the category headings for data in a table sometimes called an attribute
primary key
an attribute that uniquely identifies a record in a database table
foreign key
an attribute in one table that is the primary key in another table and is used to link the tables together
A common mistake
Mistake:A primary key and a foreign key are the same thing.
In fact:A primary key is an attribute that uniquely identifies a record in a database table, whereas a foreign key is an attribute in one table that is the primary key in another table and is used to link the tables together.
Check what you learned
From Oak National Academy's exit quiz. Choose every answer that is right.
A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0.Read the licence
Lesson 3 of 3 · GCSE level, ages 14 to 16
SQL searches
By the end:I can use SQL to retrieve data from a relational database.
SQL stands for Structured Query Language. It is a language used to communicate with a database.
You can use SQL to manipulate databases and retrieve records.
An SQL SELECT statement allows you to retrieve data from a database.
The SQL SELECT * statement allows you to return all the data and fields from a table.
Keywords
SELECT
allows you to retrieve data from a database
SELECT *
allows you to return all the columns from a database table
A common mistake
Mistake:Using SELECT * is always the best method for returning data from a database table.
In fact:You should only use the SELECT * query when all fields are needed. Including unnecessary data can be frustrating for the person viewing and working with the results.
Check what you learned
From Oak National Academy's exit quiz. Choose every answer that is right.
A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0.Read the licence
The wording comes from each publisher. The layout and the links to your syllabus are ours.