| OCR |
GCSE (9-1) Computer Science
Mark Scheme
J277/02: SQL & Databases
|
| Question | Answer | Marks | Guidance |
|---|---|---|---|
| 1 |
1. FROM 2. AND
|
2 |
1 mark per correct keyword. Case does not matter.
|
| 2 |
(a) * (Asterisk) (b) % (Percentage sign)
|
2 |
Ghost Topic: Many students write ? or *. For J277 part (b) must be %.
|
| 3 |
1. StudentID is an Integer, so "505" should NOT have quotes. 2. Field names ( FirstName, LastName) should NOT have quotes in the SELECT list.
|
2 |
The Quotes Trap: Numeric data quotes are a specific penalty point.
|
| 4 | Thor, Hulk, Odin | 3 |
Logic: Thor/Hulk are Warriors. Odin satisfies Level > 90. All three are Active.
|
| 5 |
CharName LIKE "%i"
|
2 |
1 mark for
LIKE. 1 mark for "%i" pattern. |
| 6 |
SELECT Title, Author FROM Books
|
5 |
BP3: No quotes on 2000. BP5: Author must have quotes.
|
| 7a |
SELECT Name FROM Students WHERE Score >= 80
|
3 |
Tests mapping
row[1] to Score field. |
| 7b |
- Easier to search/filter using SQL commands. - Allows concurrent access by multiple users. - Data integrity (data types are enforced). |
2 |
"It is faster" must be qualified (e.g. faster to search).
|
| 8 |
(a) SQL Injection (b) Input Sanitisation / Parameterised Queries |
2 |
Ghost Topic: Security in SQL is part of 2.2 requirements.
|