Chapter 6: Databases, SQL and Data Management
Opening lesson…
Key learning objectives
- Understand the key principles behind Databases, SQL and Data Management.
- Apply these ideas to exam-style questions.
- Recall the essential definitions and key terms.
Opening lesson…
Key learning objectives
Proof Academy · Computer Science · Chapter 06
Work through the explanations and examples, then use the quiz and resources to check what you can apply independently.
Section 01
Section 03
| Field | What to know |
|---|---|
| AO balance | AO1 recall, AO2 application and AO3 analysis/evaluation all appear across GCSE Computer Science. |
| Core dependency | tables, records, fields, primary keys, foreign keys. |
| Hardest skill | Show the method: trace table, truth table, conversion working, SQL output or extended-evaluation chain. |
| Syntax risk | OCR ERL, AQA pseudocode and Edexcel Python express the same logic differently. |
Section 04
| Stage | Technical development | Exam function |
|---|---|---|
| Foundation | Define the key terms and recognise examples. | AO1 recall marks. |
| Secure | Apply the idea to a given scenario, table, algorithm or diagram. | AO2 application marks. |
| Advanced | Trace, calculate, write, debug or evaluate with evidence. | AO2/AO3 higher-tariff marks. |
| Grade 9 | Compare alternatives, name limitations and reach a conditional judgement. | Top-band extended response. |
Section 05
Databases, SQL and Data Management exists because computer science turns messy real-world situations into exact representations, processes and decisions. The examiner rewards answers that move from input to process to output, then explain why the output is correct or what limitation remains.
Section 06
| Name | Date | Contribution | Exam relevance |
|---|---|---|---|
| Edgar F. Codd | 1923-2003 | Invented the relational database model. | Use for tables, keys and relationships. |
| Donald Chamberlin and Raymond Boyce | 1974 | Designed SQL at IBM. | Use when explaining SQL as a structured query language for relational data. |
Section 07
table schema -> sample records -> query clauses -> filtered rows -> ordered output -> common mistake check.
Section 08
SELECT firstName, lastName, mark FROM students WHERE mark > 70 ORDER BY mark DESC returns only records above 70, sorted highest mark first.
Section 09
| Construct | OCR ERL | AQA pseudocode | Edexcel / Python |
|---|---|---|---|
| Assignment | x = 5 | x ← 5 | x = 5 |
| Output | print("text") | OUTPUT 'text' | print("text") |
| Input | x = input("prompt") | x ← USERINPUT | x = input("prompt") |
| If/else | if ... then / else / endif | IF ... THEN / ELSE / ENDIF | if ...: / else: |
| For loop | for i = 0 to 9 / next i | FOR i ← 0 TO 9 / ENDFOR | for i in range(10): |
| While loop | while condition / endwhile | WHILE condition DO / ENDWHILE | while condition: |
| Function | function name(params) / return / endfunction | FUNCTION name(params) / RETURN / ENDFUNCTION | def name(params): / return |
| Integer division | DIV | DIV | // |
| Modulo | MOD | MOD | % |
| Boolean | AND / OR / NOT | AND / OR / NOT | and / or / not |
Table schema
| Field | Data type | Notes |
|---|---|---|
| studentID | Integer | Primary key |
| firstName | Text | Student first name |
| lastName | Text | Student surname |
| mark | Integer | Test mark out of 100 |
Sample data
| studentID | firstName | lastName | mark |
|---|---|---|---|
| 1041 | Sam | Patel | 68 |
| 1042 | Alice | Smith | 85 |
| 1043 | Maya | Jones | 72 |
| 1044 | Omar | Khan | 59 |
Query
SELECT firstName, lastName, mark
FROM students
WHERE mark > 70
ORDER BY mark DESC;
Expected output
| firstName | lastName | mark |
|---|---|---|
| Alice | Smith | 85 |
| Maya | Jones | 72 |
Common error: sorting all records first and then filtering. SQL applies WHERE before ORDER BY.
Section 10
OCR J277/01 Computer systems: 1 hour 30 minutes, 80 marks, 50%, non-calculator. OCR J277/02 Computational thinking, algorithms and programming: 1 hour 30 minutes, 80 marks, 50%, non-calculator. Use OCR ERL fluently for algorithm-reading questions. In J277/02, show trace-table method and give corrected logic when asked to refine an algorithm. OCR J277 has no submitted NEA/project contributing marks. Students must still complete practical programming tasks during the course to design, write, test and refine programs.
AQA 8525 updated specification: Paper 1 Computational thinking and programming skills, 2 hours, 90 marks, 50%. Paper 2 Computing concepts, 1 hour 45 minutes, 90 marks, 50%. AQA questions state the required response form: pseudocode, program code, flowchart, SQL or prose. Use a conditional judgement in extended responses and keep programming answers modular.
Pearson Edexcel 1CP2/01 Principles of Computer Science: written paper, 1 hour 30 minutes, 75 marks, 50%. 1CP2/02 Application of Computational Thinking: onscreen assessment, 2 hours, 75 marks, 50%. Component 1 includes multiple choice and theory; Component 2 is onscreen Python. Practise writing, running, testing and refining code under timed conditions.
Your selected route: AQA. AQA uses explicit response forms: if the question asks for pseudocode, program code or a flowchart, answer in that form. AQA pseudocode may be shown in questions, but students can use any suitable pseudocode when accepted.
Section 11
| Grade | What the answer sounds like | Why it scores there |
|---|---|---|
| Grade 4 | This is a trace table. It shows the values. | Correct but thin; little mechanism or scenario detail. |
| Grade 7 | The trace table records each variable after every loop pass, so the output can be checked without running the program. | Mechanism is explained and linked to the task. |
| Grade 9 | The trace table proves the output because every variable update is shown; if the loop boundary is inclusive, the final pass must be included or the output and method marks are both at risk. | Precise, conditional and mark-scheme aware. |
Section 12
| Term | Exam-quality deployment sentence |
|---|---|
| record | A record is one row in a table, such as one student. |
| primary key | A primary key uniquely identifies each record in a table. |
| foreign key | A foreign key links a record to a primary key in another table. |
Section 13
Relational databases prioritise consistency, structure and query precision. NoSQL systems often prioritise scale and flexible data, but GCSE SQL questions reward exact table, field, key and clause reasoning.
Section 14
The original OCR-centred lesson body is retained as a reading base. OCR-only fenced code examples have been replaced by the board-matched examples above so students do not rehearse the wrong syntax for their exam board.
Suitable for: GCSE Computer Science OCR J277 (with notes for AQA 8525 and Pearson Edexcel 1CP2) Access: Premium Proof Academy module for paid GCSE Computer Science users Study time: 5-7 hours Exam focus: structured data, flat-file vs relational databases, tables/records/fields, primary and foreign keys, reducing redundancy, SQL (SELECT, FROM, WHERE, ORDER BY, LIKE, AND/OR), reading tables and writing queries, using SQL inside programs, validation and integrity
Almost every real program stores data: a school management system stores students and grades, an online shop stores products and orders, a fitness app stores users and workouts. A database is the organised store behind all of this. In OCR J277 you must be able to read a database table, understand how relational databases avoid duplicating data, and write SQL queries that pull out exactly the records a problem needs. This is also a programming-project skill: your NEA or practical work often loads, filters and sorts stored data, and SQL is the cleanest way to describe "give me these records".
This unit takes you from the structure of data all the way to writing accurate SELECT statements, then closes with validation and data integrity so that the data you store is trustworthy in the first place.
Section 15
By the end of this unit, you will be able to:
SELECT queries using FROM, WHERE and ORDER BY=, <, >, <=, >=, <>) inside WHEREAND and ORLIKE operator with the % and _ wildcards for pattern matchingASC/DESCSection 16
Definition: Structured data is data organised into a fixed, predictable format (rows and columns / fields and records) so that a computer can search and process it easily. Unstructured data has no fixed format and is harder to search automatically.
Key Points:
Why This Matters: A computer can instantly answer "show all students in Year 11 sorted by surname" only because the data is structured. The same question is almost impossible to answer automatically from a folder of unstructured handwritten notes.
| Type | Format | Examples | Easy to search? |
|---|---|---|---|
| Structured | Fixed fields and records | A Students table, a spreadsheet, a contacts list | Yes — fast and reliable |
| Unstructured | No fixed format | Photos, voice notes, free-text emails, videos | No — needs extra processing |
Common Misconception: "A spreadsheet is unstructured because I can type anything." A spreadsheet uses columns and rows, so it is structured; what makes data unstructured is the lack of a defined field-per-column layout, not whether typing is possible.
Exam tip: If a question asks you to justify storing something "in a database", point to the data being structured so it can be searched, sorted and filtered efficiently.
Definition: A table holds data about one type of thing (e.g. students). A record is one row of the table — all the data about a single item. A field is one column — a single category of data shared by every record.
Key Points:
Surname or YearGroup.Why This Matters: Reading a table correctly is the foundation of every SQL question. Examiners give you a table and expect you to know that filtering with WHERE selects records (rows), while the list after SELECT chooses fields (columns).
Sample Students table:
| StudentID | FirstName | Surname | YearGroup | Tutor |
|---|---|---|---|---|
| 101 | Amira | Khan | 11 | Patel |
| 102 | Ben | Owusu | 10 | Smith |
| 103 | Chloe | Reid | 11 | Patel |
| 104 | Dev | Sharma | 9 | Jones |
Here each row (e.g. StudentID 101) is a record; each column (e.g. Surname) is a field.
Common Misconception: "A record is the whole table." No — a record is a single row. The whole collection of rows is the table.
Exam tip: Use the exact field names from the supplied table in your answers and queries. Inventing names like Name when the table says FirstName/Surname loses marks.
Definition: A primary key is a field (or combination of fields) whose value is unique for every record, so it can identify each record without ambiguity.
Key Points:
StudentID, ProductID) rather than a name, because names can repeat.Why This Matters: Without a unique key you cannot reliably pick out one record. Two students could both be "Ben Owusu"; only StudentID 102 distinguishes them. Primary keys also make linking tables possible (see foreign keys).
| Candidate field | Unique? | Good primary key? |
|---|---|---|
StudentID | Yes (assigned once) | Yes |
Surname | No (can repeat) | No |
Email | Usually yes | Possible, but can change |
YearGroup | No (many share it) | No |
Common Misconception: "A name can be the primary key." Names are not guaranteed unique, so they fail the core requirement. Use a generated ID instead.
Exam tip: When asked to identify the primary key, choose the field that is unique for every row — usually the ...ID field — and justify it with the word unique.
Definition: A foreign key is a field in one table that stores the value of the primary key of another table, creating a link (relationship) between the two tables.
Key Points:
Why This Matters: Relationships let a small piece of data (a student's details) be referenced by many other records (their library loans, grades, payments) without copying it everywhere.
Sample Orders table (foreign key links back to a Customers table):
| OrderID | CustomerID | Product | Quantity |
|---|---|---|---|
| 5001 | 101 | Mouse | 2 |
| 5002 | 103 | Keyboard | 1 |
| 5003 | 101 | Monitor | 1 |
Here OrderID is the primary key of Orders, while CustomerID is a foreign key that matches the primary key CustomerID in the Customers table.
Common Misconception: "A foreign key must have a different name from the primary key." The names are often identical (CustomerID in both tables); what matters is that it references another table's primary key.
Exam tip: State both halves: name the foreign-key field and the table whose primary key it links to.
Definition: A flat-file database stores all data in a single table. A relational database splits data into several linked tables connected by keys.
Key Points:
Why This Matters: Reducing redundancy is the single biggest reason exams give for choosing a relational database. Storing each fact once means it is updated once, so the data stays consistent.
Flat-file (notice the repeated customer details — redundancy):
| OrderID | CustName | CustEmail | Product |
|---|---|---|---|
| 5001 | Amira Khan | a.khan@... | Mouse |
| 5003 | Amira Khan | a.khan@... | Monitor |
Relational (customer stored once, referenced by ID):
| CustomerID | CustName | CustEmail |
|---|---|---|
| 101 | Amira Khan | a.khan@... |
| OrderID | CustomerID | Product |
|---|---|---|
| 5001 | 101 | Mouse |
| 5003 | 101 | Monitor |
Common Misconception: "Relational databases reduce redundancy because they use less storage per row." The real reason is that each fact is stored once and referenced by a key, which prevents duplication and the inconsistencies duplication causes.
Exam tip: Link your three benefits together: less duplication → less wasted storage → no conflicting copies (better data integrity).
Definition: SQL (Structured Query Language) is the language used to create, read, update and manage data in a relational database. A query is a SQL command that returns data.
Key Points — the core SELECT query:
SELECT lists the fields (columns) you want, or * for all fields.FROM names the table.WHERE filters which records are returned (optional).ORDER BY sorts the results, with ASC (ascending, default) or DESC (descending).SELECT → FROM → WHERE → ORDER BY.Basic shape:
Board-matched worked example: use the syntax and worked-output section above; the original OCR-centric code block has been replaced with board-aware examples.
Example — all fields for Year 11 students, sorted A–Z by surname:
Board-matched worked example: use the syntax and worked-output section above; the original OCR-centric code block has been replaced with board-aware examples.
Result from the Students table in 1.2:
| StudentID | FirstName | Surname | YearGroup | Tutor |
|---|---|---|---|---|
| 101 | Amira | Khan | 11 | Patel |
| 103 | Chloe | Reid | 11 | Patel |
Why This Matters: SELECT ... FROM ... WHERE ... ORDER BY is the backbone of nearly every database exam question and most program data lookups. Master this shape and the rest is detail.
Common Misconception: "ORDER BY comes before WHERE." The fixed order is WHERE then ORDER BY; swapping them is a syntax error.
Exam tip: Decide three things for every query: which fields (SELECT), which records (WHERE) and what order (ORDER BY). If the question does not ask to filter or sort, leave those clauses out.
Definition: Inside WHERE, comparison operators test field values, and the logical operators AND / OR combine several conditions.
Key Points — operators:
| Operator | Meaning | Example |
|---|---|---|
= | equal to | WHERE YearGroup = 11 |
<> | not equal to | WHERE Tutor <> 'Patel' |
< | less than | WHERE Price < 20 |
> | greater than | WHERE Price > 20 |
<= | less than or equal to | WHERE Stock <= 5 |
>= | greater than or equal to | WHERE Age >= 16 |
Combining conditions:
AND — both conditions must be true.OR — at least one condition must be true.Board-matched worked example: use the syntax and worked-output section above; the original OCR-centric code block has been replaced with board-aware examples.
Board-matched worked example: use the syntax and worked-output section above; the original OCR-centric code block has been replaced with board-aware examples.
Why This Matters: Real questions rarely want every record. Operators let you express precise criteria like "in stock and under £20" or "Year 9 or Year 10".
Common Misconception: "Use AND to get more results." AND narrows results (both must match); OR widens them (either matches). Choosing the wrong one is the most common logic error.
Exam tip: Watch the data type. Text needs quotes (= 'Patel'); numbers do not (= 11). Note that some boards/dialects accept != for "not equal", but <> is the safest exam choice.
Definition: LIKE matches a field against a pattern rather than an exact value, using wildcards.
Key Points:
% matches any number of characters (including none)._ (underscore) matches exactly one character.LIKE is used with text fields.| Pattern | Matches |
|---|---|
'S%' | values starting with S (Sharma, Smith, S) |
'%son' | values ending in son (Johnson, Mason) |
'%an%' | values containing "an" anywhere (Khan, Sstandish) |
'R_id' | R, then any one character, then "id" (Raid, Reid) |
Board-matched worked example: use the syntax and worked-output section above; the original OCR-centric code block has been replaced with board-aware examples.
This returns every student whose surname begins with K (e.g. Khan).
Why This Matters: Searches such as "find all surnames beginning with K" or "any email containing @school.uk" are everyday tasks; LIKE with % is exactly how you express them.
Common Misconception: "% matches a single character." % matches any number of characters; the single-character wildcard is _.
Exam tip: If the question says "starts with", put % at the end ('K%'); "ends with" puts % at the start ('%n'); "contains" puts % on both sides ('%an%').
Definition: Programs run SQL by sending a query string to the database through a library/connector, then receiving the matching records back to process in code.
Key Points:
Illustrative Python-style pseudocode:
Board-matched worked example: use the syntax and worked-output section above; the original OCR-centric code block has been replaced with board-aware examples.
Board-matched worked example: use the syntax and worked-output section above; the original OCR-centric code block has been replaced with board-aware examples.
Why This Matters: Your programming project frequently needs to load, filter and sort stored data. Knowing that SQL does the heavy lifting — and that the program then loops over the results — is a key application-of-computational-thinking skill.
Common Misconception: "SQL replaces the whole program." SQL only handles the data; the surrounding program still does input, validation, calculation and output.
Exam tip: If a scenario mentions a program "searching its records", mention that the program builds a SELECT ... WHERE query, sends it to the database and processes the rows returned.
Definition: Validation is an automatic check that data is sensible/allowable before it is accepted. Verification checks data has been entered/copied accurately. Data integrity means the data stored is accurate, consistent and complete.
Key Points — common validation checks:
| Check | What it tests | Example |
|---|---|---|
| Presence | A value was entered (not blank) | Surname must not be empty |
| Range | Value is within set limits | YearGroup between 7 and 13 |
| Type | Correct data type | Age is an integer |
| Length | Right number of characters | Password ≥ 8 characters |
| Format | Matches a pattern | Email contains @ |
| Lookup / list | Value is one of an allowed set | Tutor is on the staff list |
Verification methods: double entry (type it twice and compare) and visual/proofreading checks against a source.
Why This Matters: Garbage data makes queries return wrong answers and breaks relationships. Validation stops bad data getting in; verification stops accurate-but-mistyped data; together with primary keys and correct data types they protect integrity.
Common Misconception: "Validation proves the data is true." It does not. A range check lets Age = 14 through even if the real age is 15. Validation only checks plausibility; verification checks accuracy of entry.
Exam tip: Don't confuse the two: valid = sensible/allowed; verified = entered correctly. Name the specific check (range, presence, format) rather than just writing "validation".
Section 17
These all use the Products table below unless stated otherwise:
| ProductID | Name | Category | Price | Stock |
|---|---|---|---|---|
| 1 | Mouse | Accessory | 12.99 | 40 |
| 2 | Keyboard | Accessory | 24.50 | 8 |
| 3 | Monitor | Display | 149.00 | 5 |
| 4 | Webcam | Accessory | 39.99 | 0 |
| 5 | Laptop | Computer | 499.00 | 3 |
Question: Write a query to show the Name and Price of every product costing more than £20.
Method:
Name, Price → goes after SELECT.Products → FROM.WHERE Price > 20 (number, no quotes).Model answer:
Board-matched worked example: use the syntax and worked-output section above; the original OCR-centric code block has been replaced with board-aware examples.
Result:
| Name | Price |
|---|---|
| Keyboard | 24.50 |
| Monitor | 149.00 |
| Webcam | 39.99 |
| Laptop | 499.00 |
Exam tip: "More than" means >, not >=. A product priced exactly £20 would not appear.
Question: Show all details of every product, with the most expensive first.
Method:
SELECT *.ORDER BY Price DESC.WHERE.Model answer:
Board-matched worked example: use the syntax and worked-output section above; the original OCR-centric code block has been replaced with board-aware examples.
Result (order shown): Laptop (499.00), Monitor (149.00), Webcam (39.99), Keyboard (24.50), Mouse (12.99).
Exam tip: DESC = descending (high→low). The default ASC sorts low→high, so always add DESC when the question wants the largest first.
Question: List the Name of products that are accessories and have fewer than 10 in stock.
Method:
AND.Category = 'Accessory' (text, quotes) and Stock < 10 (number).Model answer:
Board-matched worked example: use the syntax and worked-output section above; the original OCR-centric code block has been replaced with board-aware examples.
Result:
| Name |
|---|
| Keyboard |
| Webcam |
Exam tip: Both conditions filter together. The Mouse is an accessory but has 40 in stock, so it fails the AND and is excluded.
Question: Show the Name and Category of every product in the Display or Computer category.
Method:
OR.Category = 'Display' OR Category = 'Computer'.Model answer:
Board-matched worked example: use the syntax and worked-output section above; the original OCR-centric code block has been replaced with board-aware examples.
Result:
| Name | Category |
|---|---|
| Monitor | Display |
| Laptop | Computer |
Exam tip: A common slip is writing WHERE Category = 'Display' OR 'Computer'. You must repeat the field name on each side of OR.
Question: Find the Name of every product whose name contains the letter "o".
Method:
% on both sides.LIKE '%o%' on the Name field.Model answer:
Board-matched worked example: use the syntax and worked-output section above; the original OCR-centric code block has been replaced with board-aware examples.
Result:
| Name |
|---|
| Mouse |
| Monitor |
| Webcam |
| Laptop |
Exam tip: Keyboard contains no lowercase "o" so it is excluded. For "starts with M" you would instead write LIKE 'M%'.
Question: Show the Name, Category and Price of all products priced £20 or more, sorted by Category (A–Z) and then by Price from high to low within each category.
Method:
Price >= 20 (£20 or more → >=).Category ASC, then Price DESC. List them in priority order after ORDER BY, separated by a comma.Model answer:
Board-matched worked example: use the syntax and worked-output section above; the original OCR-centric code block has been replaced with board-aware examples.
Result:
| Name | Category | Price |
|---|---|---|
| Webcam | Accessory | 39.99 |
| Keyboard | Accessory | 24.50 |
| Laptop | Computer | 499.00 |
| Monitor | Display | 149.00 |
Exam tip: When sorting on more than one field, the first field is the main sort and later fields break ties. Here Accessories come first (alphabetical category), and within Accessories the higher price (Webcam) comes first because of Price DESC.
Section 18
| Clause / keyword | Purpose | Example |
|---|---|---|
SELECT field, field | Choose which fields (columns) to return | SELECT Name, Price |
SELECT * | Return all fields | SELECT * |
FROM Table | Name the table | FROM Products |
WHERE condition | Filter which records (rows) | WHERE Price > 20 |
ORDER BY field ASC | Sort ascending (default) | ORDER BY Surname ASC |
ORDER BY field DESC | Sort descending | ORDER BY Price DESC |
ORDER BY f1, f2 | Sort by f1, then f2 for ties | ORDER BY Category, Price DESC |
AND | Both conditions must be true | WHERE A = 1 AND B = 2 |
OR | At least one condition true | WHERE A = 1 OR A = 2 |
LIKE '...' | Match a pattern | WHERE Name LIKE 'K%' |
| Operator | Meaning |
|---|---|
= | equal to |
<> | not equal to |
< | less than |
> | greater than |
<= | less than or equal to |
>= | greater than or equal to |
| Wildcard | Matches |
|---|---|
% | any number of characters (including none) |
_ | exactly one character |
SELECT → FROM → WHERE → ORDER BY
'Patel'. Numbers do not: 11.;.WHERE filters records; the SELECT list chooses fields.AND narrows results; OR widens them.OR/AND.Section 19
Structured data: Data stored in a fixed, predictable format (fields and records) so it can be searched and processed automatically.
Unstructured data: Data with no fixed format (photos, audio, free text) that is hard to search automatically.
Database: An organised, persistent store of structured data.
Table: A set of records about one type of thing (one entity).
Record: One row of a table — all the data about a single item.
Field: One column of a table — a single category of data, with a fixed data type.
Data type: The kind of value a field holds (string/text, integer, real, Boolean, date/time).
Primary key: A field whose value uniquely identifies each record in a table.
Foreign key: A field that stores the primary-key value of another table, creating a link between tables.
Flat-file database: A database held in a single table.
Relational database: A database split into multiple tables linked by keys.
Data redundancy: Unnecessary repetition of the same data, which wastes space and risks inconsistency.
SQL (Structured Query Language): The language used to query and manage relational databases.
Query: A SQL command that returns or changes data.
SELECT: SQL keyword that chooses which fields to return.
FROM: SQL keyword that names the table to read from.
WHERE: SQL keyword that filters which records are returned.
ORDER BY: SQL keyword that sorts results (ASC ascending, DESC descending).
LIKE: Operator that matches a field against a pattern using wildcards.
Wildcard: A symbol used in patterns — % (any characters) or _ (one character).
Comparison operator: A symbol (=, <>, <, >, <=, >=) used to test field values.
Validation: An automatic check that data is sensible/allowable before acceptance.
Verification: A check that data was entered or copied accurately.
Data integrity: The accuracy, consistency and completeness of stored data.
Section 20
Database and SQL questions reward precision, so use this routine:
>, "at least" → >=, "not" → <>, "starts with" → LIKE 'X%', "both…and" → AND, "either…or" → OR.SELECT → FROM → WHERE → ORDER BY. Finish with a semicolon.> vs >=), as this is where marks are most often lost.Master the SELECT … FROM … WHERE … ORDER BY pattern, know your operators and wildcards, and keep validation separate from verification, and you will have covered the full OCR J277 data-handling demand for both written papers and your programming project.
Section 21
| Layer | What to know |
|---|---|
| Definition and mechanism | Define tables and explain how it works in a real system or algorithm. |
| Implementation | Show how the idea appears in code, a table, a truth table, a calculation or a network diagram. |
| Quantitative evidence / worked example | Use the worked example in this unit and show each step, not only the answer. |
| Evaluation and limitations | State when the method fails, becomes inefficient, creates bias, loses precision or depends on context. |
| Concept/fact | What it proves | How to use in an exam answer |
|---|---|---|
| tables | A primary key uniquely identifies one record and must be unique and non-null. | Use this to anchor a precise AO2 application point. |
| records | A foreign key stores the primary key from another table to form a relationship. | Use this to anchor a precise AO3 evaluation point. |
| fields | WHERE filters rows before ORDER BY sorts the filtered result. | Use this to anchor a precise AO2 application point. |
| primary keys | A primary key uniquely identifies one record and must be unique and non-null. | Use this to anchor a precise AO3 evaluation point. |
| foreign keys | A foreign key stores the primary key from another table to form a relationship. | Use this to anchor a precise AO2 application point. |
| relationships | WHERE filters rows before ORDER BY sorts the filtered result. | Use this to anchor a precise AO3 evaluation point. |
| validation | A primary key uniquely identifies one record and must be unique and non-null. | Use this to anchor a precise AO2 application point. |
| verification | A foreign key stores the primary key from another table to form a relationship. | Use this to anchor a precise AO3 evaluation point. |
| Stage | Technical development | Exam function |
|---|---|---|
| Recognise | Identify the term, symbol, keyword or component. | 1-mark recall. |
| Explain | Describe what it does and why it is needed. | 2-4 mark explanation. |
| Apply | Use it in a scenario, calculation, trace, SQL output or program. | Higher AO2 marks. |
| Evaluate | Compare alternatives and state a limitation. | Extended response/top band. |
| Example type | What it demonstrates | Common error to avoid |
|---|---|---|
| Trace/output example | The final answer follows from each variable update. | Guessing the output without completing every row. |
| Syntax translation | The same logic can be expressed in OCR ERL, AQA pseudocode and Python. | Mixing syntax styles in one answer. |
| Scenario judgement | Technical choices affect users, cost, performance or risk. | Giving an unsupported one-sided claim. |
| Term | Exam-quality deployment sentence |
|---|---|
| record | A record is one row in a table, such as one student. |
| primary key | A primary key uniquely identifies each record in a table. |
| foreign key | A foreign key links a record to a primary key in another table. |
OCR: OCR J277/01 Computer systems: 1 hour 30 minutes, 80 marks, 50%, non-calculator. OCR J277/02 Computational thinking, algorithms and programming: 1 hour 30 minutes, 80 marks, 50%, non-calculator. OCR J277 has no submitted NEA/project contributing marks. Students must still complete practical programming tasks during the course to design, write, test and refine programs.
AQA: AQA 8525 updated specification: Paper 1 Computational thinking and programming skills, 2 hours, 90 marks, 50%. Paper 2 Computing concepts, 1 hour 45 minutes, 90 marks, 50%. AQA uses explicit response forms: if the question asks for pseudocode, program code or a flowchart, answer in that form. AQA pseudocode may be shown in questions, but students can use any suitable pseudocode when accepted.
Pearson Edexcel: Pearson Edexcel 1CP2/01 Principles of Computer Science: written paper, 1 hour 30 minutes, 75 marks, 50%. 1CP2/02 Application of Computational Thinking: onscreen assessment, 2 hours, 75 marks, 50%. Edexcel Paper 1 includes multiple choice, short, medium and extended responses. Paper 2 is practical Python: design, write, test and refine programs in the IDE.
Selected route reminder: AQA - Primary syntax: AQA pseudocode for pseudocode questions, plus supported program code where the paper asks for program code. AQA 8525 exams from 2027 support Python 3, C# and VB.NET.
This unit proves that Computer Science marks are won through exact representations: code syntax, trace tables, truth tables, SQL outputs, conversions, named laws or structured evaluations. The concept is never enough by itself; the method and evidence must be visible.
The hardest thing to get right is board discipline. OCR ERL, AQA pseudocode and Edexcel Python can express the same algorithm, but each paper rewards answers that match its own syntax, command words and assessment style.
Section 22
GCSE Computer Science: algorithms, programming, data representation, systems, networks, cyber security, databases and impacts.
Exam-board lens for this lesson: AQA. Use this chapter to revise the content, but also to practise how examiners reward marks in real papers.
state, describe, explain, trace, write, evaluate
Grade 4 / basic pass move: Recalls the correct term or follows a simple trace.
Grade 7 / strong answer move: Applies the concept to a scenario and justifies a technical choice.
Grade 9 move: Designs or evaluates a robust solution using testing, edge cases and clear computational reasoning.
For short answers, make the point precise before adding explanation. For extended answers, build a chain of reasoning, apply it to the named context, then make a judgement only if the command word requires one. A high-mark answer is not just longer; it is more selective, better evidenced and more explicit about why one factor matters more than another.