OCR A-Level Computer Science Computer systems (01), June 2025: Question 6
20 marks · Medium difficulty · Short Answer
Explain the benefits of software libraries, identify compilation stages, contrast compilers and interpreters, and write SQL statements including an INSERT query and a nested SELECT query.
Practise this questionQuestion
Question text
6 DCC Software is a company that creates a wide range of software products for home computers.
Its products include image, video and sound editing software.
(a) DCC Software makes significant use of software libraries.
Explain the benefits of using software libraries to create software.
… [4]
(b) Once DCC Software has written a piece of software, they use translators to translate the
programming code.
(i) The table shows different stages of code compilation labelled A, B, C and D.
A Lexical analysis
B Syntax analysis
C Code generation
D Code optimisation
In each box write the letter of the stage that matches each description.
Converts the high level code into low level instructions
Examines the code and improves the efficiency of it
without affecting the functionality
Removes comments and whitespace and then converts
the high level code into tokens
Identifies syntax errors and creates an abstract syntax tree
[4]
(ii) DCC Software is considering the benefits of both an interpreter and a compiler.
State two benefits of using an interpreter.
Benefit 1 …
Benefit 2 …
[2]
(iii) State two benefits of using a compiler.
Benefit 1 …
Benefit 2 …
[2]
(c) DCC software uses a database table called TblSoftware to store details about all of their
products.
ProductID Name Type Price
DCC01 DCCPhotos Image £129.99
DCC02 DCCDraw Image £119.99
DCC03 DCCAnimate Image £99.99
DCC04 DCCMovie Video £189.99
DCC05 DCCEffects Video £99.99
DCC06 DCCAudio Sound £119.99
TblSoftware
(i) Write an SQL statement to insert this new product into TblSoftware:
ProductID: DCC07
Name: DCCCast
Type: Sound
Price: £89.99
… [3]
(ii) Write an SQL statement to return the Name of products that have a Price that is less than the
Price of the product with the Name "DCCDraw".
You should use a nested SELECT statement in your answer.
… [5]
Mark scheme
Show the mark scheme
6 (a) 1 mark for each to max 4. 4 Allow: ‘saves developers time’
● Reduces development/debugging time.
● Reduced programming knowledge is needed. DNA ‘saves time’ on its own
● Libraries will already be tested.
● Libraries are often optimised for performance.
● Libraries are designed to work across multiple platforms.
● Consistency between applications
● Reduces file sizes (DLLs)
6 (b) (i) 1 mark for each correct match to max 4.
C
D
A
B
6 (b) (ii) 1 mark for each to max 2. 2
● Easier/faster to debug/fix errors/maintain
● Easier/faster to test code line by line
● Code will still run until the first error
● Code is portable across different architectures
(iii) 1 mark for each to max 2. 2
● Do not need to distribute source code // protects intellectual property
● Do not need run-time environment // code is not re-translated each time it
runs
● Faster run-time (once compiled)
● Produces an executable file
● Code is optimised
6 (c) (i) 1 mark for each to max 3. 3 Field and table names must be in
● INSERT INTO TblSoftware (ProductID, Name, Type, Price) the correct case as given.
● VALUES
● (“DCC07”, “DCCCast”, “Sound”, 89.99) MP1 does not require field names.
Allow Price in speech marks e.g.:
“89.99” or “£89.99”.
For full marks a fully correct
working answer must be provided.
Max 2 if the order of MP1/2/3 is not
correct.
6 (c) (ii) 1 mark for each correct line to max 5. 5 Field and table names must be in
25 the correct case as given.
● SELECT Name FROM TblSoftware
● WHERE Price < ( Allow FT for missing brackets.
● SELECT Price
● FROM TblSoftware Allow == for comparison.
● WHERE Name = ‘DCCDraw’)
How to answer it
Software Libraries, Translators & SQL Nested Queries
This question assesses core Component 01 content across systems software development and relational database querying:
- Software Libraries: Practical benefits to developers and performance advantages of shared modules.
- Stages of Compilation: Characteristics of lexical analysis, syntax analysis, code generation, and optimisation.
- Translators (Compilers vs. Interpreters): Operational differences, advantages during debugging vs execution/distribution.
- Structured Query Language (SQL): Data modification via INSERT INTO and relational querying via nested subqueries ( SELECT within WHERE ).
Part (a) — Benefits of Using Software Libraries
[4 Marks]
✅ Acceptable Points (Any 4, 1 mark each)
- Reduces development time or debugging time (or saves developer effort).
- Reduced programming knowledge needed (complex subroutines are pre-written by experts).
- Libraries will already be tested and error-free.
- Libraries are often optimised for performance / speed.
- Libraries are designed to work across multiple platforms / cross-platform.
- Provides consistency between applications (e.g. standard file dialogues, UI consistency).
- Reduces file sizes if dynamic libraries (DLLs) are shared.
❌ Common Errors & Mark Scheme Traps
- Vague time references: Writing just "saves time" is Do Not Accept (DNA). You must specify that it saves development or debugging time, not runtime!
- Conflating runtime speed: Merely saying "it runs faster" without context is insufficient; mention that library routines are pre-optimised.
Part (b)(i) — Stages of Compilation Matching
[4 Marks]
✅ Matching Pairs & Order
| Description | Letter | Stage Name |
|---|---|---|
| Converts the high-level code into low-level instructions | C | Code generation |
| Examines the code and improves the efficiency of it without affecting functionality | D | Code optimisation |
| Removes comments and whitespace and then converts the high-level code into tokens | A | Lexical analysis |
| Identifies syntax errors and creates an abstract syntax tree | B | Syntax analysis |
💡 The 4 Stages in Order
- A: Lexical Analysis: Strips whitespace & comments, turns lexemes into tokens, creates symbol table.
- B: Syntax Analysis: Checks grammar rules, reports syntax errors, produces Abstract Syntax Tree (AST).
- C: Code Generation: Translates intermediate code/AST into machine code or intermediate byte code.
- D: Code Optimisation: Removes redundant code and replaces inefficient instructions to boost runtime performance and reduce footprint.
🧠 Exam Technique
Notice the chronological sequence of compilation: Lexical → Syntax → Generation → Optimisation. In matching questions, anchor keywords first: "tokens" = Lexical; "tree / grammar" = Syntax; "efficiency" = Optimisation; "low-level" = Generation.
Part (b)(ii) & (iii) — Translators: Interpreter vs Compiler
[2 + 2 = 4 Marks]
✅ (b)(ii) Two Benefits of an Interpreter (Max 2)
- Easier / faster to debug and maintain (stops immediately when an error is encountered).
- Can test code line by line without needing full compilation each time.
- Code will still run up to the first error encountered.
- Source code is portable across different machine architectures (as long as an interpreter exists).
✅ (b)(iii) Two Benefits of a Compiler (Max 2)
- Protects intellectual property / source code: No need to distribute the human-readable source code.
- No interpreter / runtime environment required on the end user's machine.
- Faster execution / run-time once compiled (already machine code; no line-by-line translation).
- Produces a standalone executable file (.exe).
- Code is optimised during compilation.
❌ Common Errors
- Claiming compilers "run faster": Compilers do not run faster—the compiled code executes faster at runtime. Be precise!
- Forgetting that interpreted code must ship with source code, exposing proprietary logic to clients.
🧠 Top Mark Differentiator
Always state when the advantage occurs: Interpreters hold advantages during development and debugging; Compilers hold advantages at deployment and runtime execution.
Part (c)(i) — SQL INSERT Statement
[3 Marks]
✅ Model Answer
📐 Step-by-Step Mark Breakdown (3 Marks)
- Mark 1: Correct syntax: INSERT INTO TblSoftware (...) . Note: Field names are optional if all fields are supplied in order, but strongly recommended.
- Mark 2: Keyword VALUES correctly placed.
- Mark 3: Correct data items supplied: ('DCC07', 'DCCCast', 'Sound', 89.99) .
❌ Common Errors & Mark Scheme Conditions
- Case-sensitivity: Table names and field names must preserve the correct casing as given in the specification: TblSoftware , ProductID .
- Quotation marks: Text/string values ( 'DCC07' , 'DCCCast' , 'Sound' ) must have quotes. Price can be numeric or quoted as per the mark scheme allowance ( 89.99 or '89.99' ).
- Order constraint: If the order of clauses ( INSERT INTO , VALUES , contents) is incorrect, mark is capped at a maximum of 2.
Part (c)(ii) — SQL Nested SELECT Query
[5 Marks]
✅ Model Answer
📐 Step-by-Step Mark Breakdown (5 Marks)
- Mark 1: Outer query projection: SELECT Name FROM TblSoftware
- Mark 2: Comparison clause: WHERE Price < ( ... )
- Mark 3: Subquery projection: SELECT Price
- Mark 4: Subquery source: FROM TblSoftware
- Mark 5: Subquery criteria: WHERE Name = 'DCCDraw' (or == )
❌ Common Traps to Avoid
- Hardcoding the price: Writing WHERE Price < 119.99 scores 0 for the nested logic. The question explicitly mandates a nested SELECT statement.
- Missing parentheses: Subqueries in SQL must always be wrapped inside parentheses: (SELECT ...) . Missing brackets may be penalised or rely on Follow-Through (FT).
- Selecting the wrong column in subquery: Writing SELECT * or SELECT Name inside the subquery makes a numeric comparison with Price < invalid! The subquery must return the scalar Price .
Topics
1.2 Software and software development · 1.3 Exchanging data · 1.2.2 Applications Generation · 1.3.2 Databases
Question and mark scheme from the OCR A-Level Computer Science examination, Computer systems (01), June 2025. QuestionVault is an independent revision resource; questions remain the copyright of the awarding body.