0% found this document useful (0 votes)
2 views16 pages

IB CS Databases ExamStyleSets

The document outlines examination sets for a Higher Level Computer Science Diploma Programme focusing on databases. It includes instructions for candidates, model answers for various questions, and covers topics such as data definitions, database management systems, normalization, and SQL queries. The document serves as a practice paper for students to assess their understanding of database concepts and applications.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views16 pages

IB CS Databases ExamStyleSets

The document outlines examination sets for a Higher Level Computer Science Diploma Programme focusing on databases. It includes instructions for candidates, model answers for various questions, and covers topics such as data definitions, database management systems, normalization, and SQL queries. The document serves as a practice paper for students to assess their understanding of database concepts and applications.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Diploma Programme

Computer science
Higher level
Option A — Databases
Practice Paper — 3 Examination Sets
Based on student notes (A.1–A.4 HL)
1 hour 20 minutes per set

Instructions to candidates
Answer all questions in the set assigned to you.
The maximum mark for each set is [65 marks].
Model answers are provided at the end of each question for self-assessment.

Option Questions

Set 1 — Fundamentals (A.1 – A.2) 1–4

Set 2 — Database Management (A.2 – A.3) 5–8

Set 3 — HL Extension (A.4) 9 – 13


Option A — Databases

Set 1 — Fundamentals
1. A school uses a database to manage student records. The database contains a STUDENT table, a
COURSE table, and an ENROLLMENT table.

(a) Define the term data and explain how it differs from information. Use an example [3]
from a school database.

MODEL ANSWER
• Data refers to raw, unorganised facts or values that have no meaning by themselves. Example:
the number 87 stored in a cell.
• Information is data that has been processed and given context so it becomes meaningful.
Example: "Student ID S101 scored 87% in Mathematics."
• Data becomes information when it is organised, labelled, and interpreted — moving from a raw
value to something that supports decision-making. [1 mark each, max 3]

Examiner tip: Always give a concrete database example. Generic definitions without context lose marks.

(b) Identify three disadvantages of using a traditional file-based system compared to a [3]
DBMS for storing student records.

MODEL ANSWER
• Data redundancy: the same student name may be stored in multiple files (e.g., attendance,
grades, library), wasting storage and causing inconsistency.
• Data inconsistency: if the student's name is updated in one file but not another, different files
hold conflicting data.
• Poor data sharing: departments cannot easily share or access each other's data in a file system,
requiring duplication.
• Also accept: lack of security controls; no support for concurrent multi-user access; no
backup/recovery mechanisms. [1 each, max 3]

(c) Explain two benefits of using a DBMS to manage school data. [4]

MODEL ANSWER
• Concurrency control: Multiple teachers can read/update student records simultaneously without
data conflicts, because the DBMS uses locking mechanisms to prevent lost updates. [2]
• Data integrity: The DBMS enforces constraints such as primary keys, foreign keys, and domain
rules. For example, a student's grade cannot be entered as a text value if the field is defined as
integer. [2]

Examiner tip: "Explain" requires a named benefit + a developed reason for how it helps. Single-sentence
answers score max 1.

(d) State two characteristics of a relational database. [2]

MODEL ANSWER
• Data is organised into tables (relations) consisting of rows (tuples) and columns (attributes).
• Relationships between tables are established using primary and foreign keys.

–1– 8824–EXAM © IB-style Practice Paper


• Also accept: uses SQL; supports ACID transactions; fixed schema with defined data types. [1
each]

2. A hospital uses the following table to record patient appointments:

APPOINTMENT(AppID, PatientID, PatientName, DoctorID, DoctorName, DoctorSpecialty,


AppDate, Diagnosis)

(a) Define the term primary key. [1]


MODEL ANSWER
• A primary key is a field (or combination of fields) that uniquely identifies each record in a table. It
cannot contain NULL values and must be unique for every row.

(b) Define the term secondary key and give one example from the APPOINTMENT [2]
table above.
MODEL ANSWER
• A secondary key is a field (or set of fields) used to index or search a table but does not uniquely
identify records — it may return multiple matching rows.
• Example from this table: DoctorSpecialty — searching by specialty returns all cardiologists'
appointments, not a single row. [1 each]

(c)(i) Identify three reasons why it is important to enforce referential integrity in the [3]
hospital database.
MODEL ANSWER
• Prevents orphan records: an appointment cannot reference a PatientID that does not exist in the
PATIENT table.
• Prevents deletion anomalies: a doctor record cannot be deleted if appointments still reference
that DoctorID.
• Maintains data consistency: ensures relationships between tables remain logically valid
throughout all operations.
• Also accept: prevents invalid insertions; ensures referencing foreign keys always match a real
primary key. [1 each, any 3]

(c)(ii) Explain how a query can provide a view of the hospital database. [3]
MODEL ANSWER
• A view is a virtual table generated by a stored SELECT query — it does not store data itself but
presents selected fields from one or more underlying tables. [1]
• The query specifies which columns and rows to include, so different users see only the data
relevant to their role. Example: a ward nurse sees only their patients' diagnoses, not billing data.
[1]
• Since the view dynamically reflects the current state of the base tables, any updates to the real
tables are automatically visible through the view. [1]

Examiner tip: Key point: the view presents a customised, restricted or simplified perspective. Always link
to the question's context (hospital).

(d)(i) Outline why the APPOINTMENT table above is not in 3rd Normal Form (3NF). [4]
MODEL ANSWER

–2– 8824–EXAM © IB-style Practice Paper Turn over


• Partial dependency (violates 2NF): DoctorName and DoctorSpecialty depend only on DoctorID,
not on the full primary key AppID. Similarly, PatientName depends only on PatientID. [2]
• Transitive dependency (violates 3NF): PatientName is determined by PatientID, which is a
non-key attribute, not by the primary key AppID directly. So PatientName transitively depends on
AppID via PatientID. [2]

Examiner tip: 4-mark normalisation "outline" needs 2 violations each explained. Naming the violation type
is worth 1; the specific field/dependency earns the second mark.

(d)(ii) Construct the APPOINTMENT database in 3rd Normal Form (3NF). Use database [6]
notation. Underline primary keys and mark foreign keys with *.
MODEL ANSWER
• PATIENT(PatientID, PatientName)
• DOCTOR(DoctorID, DoctorName, DoctorSpecialty)
• APPOINTMENT(AppID, *PatientID, *DoctorID, AppDate, Diagnosis)
• Marks: 1 per correct table (×3); 1 for all PKs underlined; 1 for FKs marked in APPOINTMENT; 1
for no redundancy (PatientName and DoctorName removed from APPOINTMENT). Max [6]

Examiner tip: The junction table APPOINTMENT is still needed — it holds the unique appointment data
(date, diagnosis) that belongs to neither PATIENT nor DOCTOR alone.

3. A national bank operates a centralised database shared by all its branches.

(a) Describe how data locking manages a situation where two bank tellers attempt to [2]
update the same customer account simultaneously.
MODEL ANSWER
• When Teller A opens Account #12345 for editing, the DBMS places an exclusive lock on that
record, preventing any other transaction from reading or writing it. [1]
• Teller B's request is queued or rejected until Teller A commits or rolls back the transaction and
the lock is released, ensuring no data is lost or corrupted. [1]

(b) Explain the ACID properties of a database transaction. For each property, give a [8]
bank transfer example.
MODEL ANSWER
• Atomicity: All operations in a transaction succeed or none do. Example: debiting £500 from
Account A and crediting Account B must both complete — if the credit fails, the debit is rolled
back. [2]
• Consistency: The total money in the system remains the same before and after. If Account A has
£1,000 and £200 is transferred to B, the combined balance stays £1,000. [2]
• Isolation: Concurrent transactions do not interfere. If two transactions update Account A
simultaneously, each sees the committed state, not each other's intermediate changes. [2]
• Durability: Once a transfer is committed, it is permanent even if the system crashes immediately
after. Transaction logs ensure recovery. [2]

Examiner tip: 8-mark ACID questions require all 4 properties. [2] each = definition (1) + example (1).
Missing the bank context loses the example mark.

(c) Discuss the advantages and disadvantages of a centralised database for the bank. [5]
MODEL ANSWER

–3– 8824–EXAM © IB-style Practice Paper


• Advantages: Single point of truth — all branches access the same current balance, eliminating
inconsistency between branches. Easier to enforce security, backup, and compliance standards
centrally. Enables nation-wide analysis (fraud detection across all transactions). [up to 3]
• Disadvantages: Single point of failure — a central server crash stops all branches
simultaneously. High network latency for remote branches. Expensive to build and maintain
infrastructure. Data breach risk is amplified (all data in one place). [up to 3]
• Evaluative statement for [5]: e.g., "While the centralised model maximises consistency, the single
point of failure risk is critical for a bank, suggesting a distributed backup strategy is essential."

Examiner tip: "Discuss" = balanced argument + evaluative conclusion. 2 advantages + 2 disadvantages +


1 evaluative point = [5].

(d) Identify three ways that the General Data Protection Regulation (GDPR) protects [3]
individuals whose data is held by the bank.
MODEL ANSWER
• Right of access: customers can request to see all personal data the bank holds about them.
• Right to erasure: customers can request deletion of their data when it is no longer required for
the original purpose.
• Data minimisation: the bank may only collect data strictly necessary for the banking service —
not additional personal details without consent.
• Also accept: consent requirement; right to portability; breach notification within 72 hours; purpose
limitation. [1 each, any 3]

4. A hospital is developing a database to store patient records. During design, several validation rules are
applied.

(a) Distinguish between validation and verification. [2]


MODEL ANSWER
• Validation is an automatic computer check that tests whether data is sensible and within
acceptable rules (e.g., age must be between 0 and 120). It does not guarantee the data is correct.
[1]
• Verification is a check to ensure data has been entered accurately — for example, double-entry
of a password or a nurse proofreading a patient form against source documents. [1]

(b) For each of the following hospital fields, identify and justify an appropriate validation [6]
type:
(i) Patient blood group (A, B, AB, or O)
(ii) Date of birth
(iii) UK National Insurance Number (format: AB 12 34 56 C)

MODEL ANSWER
• (i) Lookup table / restricted value check: only values A, B, AB, O are valid. The system
compares input against a predefined list, rejecting anything else. [2]
• (ii) Range check + format check: date must be a valid date format and must not be in the future
(a patient cannot be born tomorrow). [2]
• (iii) Format check: the value must match the pattern LL NN NN NN L (2 letters, 6 digits, 1 letter).
The system validates the structure, not just the length. [2]

–4– 8824–EXAM © IB-style Practice Paper Turn over


(c) A database schema describes the structure of a database at different levels of [6]
abstraction. Describe the three levels of database schema.
MODEL ANSWER
• Conceptual schema: high-level, technology-independent view of the database. Describes
entities, attributes, and relationships without any implementation detail. Represented as an ERD.
Example: "Students enrol in Courses." [2]
• Logical schema: defines the data structure within a specific data model (relational, OO, etc.) but
independent of physical storage. Specifies tables, columns, data types, primary/foreign keys, and
constraints. [2]
• Physical schema: lowest level — describes how data is actually stored on disk. Details file
locations, indexing strategies (e.g., B-tree), storage allocation, and access methods. Hardware
and OS dependent. [2]

Examiner tip: The three-schema architecture (ANSI/SPARC) separates user views from physical storage.
Never confuse logical with physical — logical is about structure, physical is about storage.

End of Set 1

–5– 8824–EXAM © IB-style Practice Paper


Option A — Databases

Set 2 — Database Management


5. A university uses a relational database containing the following table:

ENROLLMENT(StudentID, CourseID, CourseName, Instructor, InstructorOffice, EnrollDate,


Grade)

(a) Describe the Entity-Relationship Diagram (ERD) that should be created before this [4]
database is built. Identify all entities, attributes, and cardinality.
MODEL ANSWER
• Entities: STUDENT (StudentID, StudentName), COURSE (CourseID, CourseName, Instructor,
InstructorOffice), ENROLLMENT (StudentID*, CourseID*, EnrollDate, Grade)
• Cardinality: STUDENT to ENROLLMENT is 1:M (one student can have many enrollments);
COURSE to ENROLLMENT is 1:M (one course has many enrollments). STUDENT to COURSE
via ENROLLMENT is M:N. [1 per entity (×3) + 1 for correct cardinality = 4]
• ERDs are drawn with rectangles (entities), ovals (attributes), diamonds (relationships), and crow's
foot/1-M notation on relationship lines.

Examiner tip: An M:N relationship between STUDENT and COURSE must be resolved using the junction
entity ENROLLMENT. State this explicitly.

(b) Identify the role of cardinality in an ERD and explain why it is important during [3]
database design.
MODEL ANSWER
• Cardinality defines the maximum number of entity instances that can participate in a relationship
— e.g., 1:1, 1:M, or M:N. [1]
• It determines where foreign keys are placed when converting the ERD to a relational schema. In
a 1:M relationship, the FK goes in the "many" side table. [1]
• Without cardinality, relationships are ambiguous, leading to incorrect table structures, missing
foreign keys, or unnecessary junction tables. [1]

(c) Construct an SQL query to display the full name and grade of all students enrolled in [4]
the course with CourseID = 'CS101', sorted by grade descending. Assume a
STUDENT table exists with StudentID and StudentName.
MODEL ANSWER
SELECT [Link], [Link]
FROM ENROLLMENT
JOIN STUDENT ON [Link] = [Link]
WHERE [Link] = 'CS101'
ORDER BY [Link] DESC;
• 1 mark: correct SELECT; 1 mark: JOIN with correct ON clause; 1 mark: WHERE CourseID
condition; 1 mark: ORDER BY DESC.

Examiner tip: Always use the table prefix ([Link]) in multi-table queries to avoid ambiguity
errors.

–6– 8824–EXAM © IB-style Practice Paper Turn over


(d) Explain the difference between DDL and DML, giving two examples of commands in [4]
each.
MODEL ANSWER
• DDL (Data Definition Language) defines and modifies database structure/schema. All DDL
changes are auto-committed. Examples: CREATE TABLE, ALTER TABLE, DROP TABLE. [2]
• DML (Data Manipulation Language) accesses and modifies data within existing tables. Changes
can be rolled back. Examples: SELECT, INSERT, UPDATE, DELETE. [2]

6. A retail company uses a database to manage orders. Two transactions are running concurrently:

T1: Updates the stock level of product P100 (decrease by 5)

T2: Reads the stock level of product P100 to check availability

(a) Explain, using this scenario, the problems that can arise from concurrent execution [4]
without concurrency control.
MODEL ANSWER
• Dirty read: T2 reads the intermediate (uncommitted) value of P100 while T1 is in the middle of
updating it. If T1 is later rolled back, T2 has acted on incorrect data. [2]
• Lost update: If both T1 and T2 read the stock value (say 50), T1 decreases to 45 and writes, then
T2 performs its own update — T1's change is overwritten/lost. [2]

(b) Describe the two-phase locking (2PL) protocol and explain how it resolves the [4]
concurrency problems in (a).
MODEL ANSWER
• In the growing phase, a transaction can acquire new locks (shared or exclusive) on data items
but cannot release any. In the shrinking phase, locks can be released but no new locks can be
acquired. [2]
• This ensures that T2 cannot read P100 while T1 holds an exclusive (write) lock on it, preventing
dirty reads. Once T1 commits and releases its lock, T2 can acquire a shared lock and read the
final committed value. [2]

Examiner tip: State both phase names and their rules. Then explicitly connect each phase to the specific
problem from part (a).

(c) Describe the purpose of TCL commands COMMIT, ROLLBACK, and SAVEPOINT [6]
in maintaining database integrity.
MODEL ANSWER
• COMMIT: Permanently saves all changes made in the current transaction to the database. Once
committed, changes cannot be undone. Used after all operations succeed successfully. [2]
• ROLLBACK: Undoes all changes made in the current transaction back to the last COMMIT or to a
SAVEPOINT. Used when an error occurs mid-transaction to restore the database to its last
consistent state. [2]
• SAVEPOINT: Creates a named checkpoint within a transaction. Allows a partial rollback — the
transaction can be rolled back to this point rather than all the way to the start. Useful in complex
transactions. [2]

(d) Outline the role of a Database Administrator (DBA) in a large organisation. Give [4]
four specific responsibilities.

–7– 8824–EXAM © IB-style Practice Paper


MODEL ANSWER
• Schema definition: Determines the structure and organisation of data, defining tables, columns,
constraints, and relationships. [1]
• Security and access control: Grants and revokes user permissions, defines authentication
requirements, and protects against unauthorised access. [1]
• Backup and recovery planning: Defines what data is backed up, how often, and the recovery
procedure after system failures. [1]
• Performance monitoring: Continuously monitors query performance, creates indexes, optimises
slow queries, and ensures the system meets response time requirements. [1]

7. A government health authority wants to introduce a national health record database that integrates data
from all hospitals and clinics.

(a) Outline the function of a data dictionary in a DBMS. [4]


MODEL ANSWER
• A data dictionary is a centralised repository of metadata — data about the data stored in the
database. It describes the names, types, and sizes of all fields, tables, constraints, indexes, and
relationships. [2]
• It is automatically updated when database objects are created or modified, and is used by the
DBMS to optimise queries, enforce integrity constraints, and manage user permissions. [2]

Examiner tip: "Outline" questions need a brief explanation not just a definition. The DBMS using the data
dictionary for enforcement/optimisation earns the second mark.

(b) Outline two methods used to ensure the privacy of personal health data held in this [4]
national database.
MODEL ANSWER
• Role-based access control (RBAC): Permissions are assigned based on job roles — a GP only
sees their own patients' records, while a hospital admin can see all records within their hospital.
This limits exposure to sensitive data. [2]
• Data encryption: Patient records are encrypted at rest (on disk) and in transit (over the network).
Even if data is intercepted or stolen, it is unreadable without the decryption key. [2]
• Also accept: data anonymisation/pseudonymisation; audit trails; two-factor authentication. [2 each,
any 2]

(c) Discuss the social and ethical considerations of a government holding a centralised [5]
national health database.
MODEL ANSWER
• Benefits: Enables faster, more accurate diagnoses as doctors access complete patient history.
Supports national disease surveillance and pandemic response. Reduces duplicate tests and
medical errors.
• Concerns: Mass surveillance risk — government could use health data for purposes beyond
healthcare (insurance discrimination, immigration decisions). Single breach exposes millions of
sensitive records. Citizens may lose autonomy over their own health information.
• Ethical obligations: Data must be collected only with informed consent, used only for its stated
purpose (purpose limitation), and stored securely. Data subjects must have the right to access and
correct their records (GDPR-style rights).

–8– 8824–EXAM © IB-style Practice Paper Turn over


• Evaluative point: The benefit of coordinated care may justify the database if robust governance,
independent oversight, and clear legal boundaries prevent mission creep and abuse.

Examiner tip: 5-mark discuss: 2 benefits + 2 concerns + 1 evaluative/concluding sentence. Both sides
must be genuinely engaged with.

8. A company stores employee records in the following SQL table:


EMPLOYEE(EmpID, FirstName, LastName, Department, Salary, HireDate, ManagerID)

(a) Write SQL commands to perform the following operations: [6]


(i) Display all employees in the 'Engineering' department earning more than $80,000, sorted by salary
descending.
(ii) Increase the salary of all employees hired before 2020-01-01 by 10%.
(iii) Delete all records where the Department is 'Intern'.

MODEL ANSWER
(i) SELECT * FROM EMPLOYEE WHERE Department = 'Engineering' AND Salary > 80000
ORDER BY Salary DESC;
(ii) UPDATE EMPLOYEE SET Salary = Salary * 1.10 WHERE HireDate < '2020-01-01';
(iii) DELETE FROM EMPLOYEE WHERE Department = 'Intern';
• 2 marks each. (i): correct WHERE with AND + ORDER BY DESC; (ii): SET with multiplication,
correct WHERE date; (iii): correct condition.

(b) Explain how a database view could be used to allow HR staff to see employee [3]
names and departments but not salaries.
MODEL ANSWER
• A view is a virtual table created by a SELECT query that only includes specific columns. [1]
CREATE VIEW HR_View AS SELECT EmpID, FirstName, LastName, Department FROM
EMPLOYEE;
• HR staff are granted SELECT privilege on HR_View but not on the EMPLOYEE table directly.
They can query HR_View and see names/departments but the Salary and HireDate columns are
invisible to them. This enforces data security without multiple tables. [2]

Examiner tip: Always write the actual CREATE VIEW statement in SQL questions about views. Describing
it in words alone loses marks.

(c) Describe two methods of database recovery after a system failure. [4]
MODEL ANSWER
• Log-based recovery: The DBMS maintains a transaction log recording every change (before and
after values). After a crash, the recovery system reads the log and undoes uncommitted
transactions and redoes committed ones to restore the last consistent state. [2]
• Checkpoint recovery: Periodically the DBMS writes a checkpoint to disk, flushing all committed
transactions. After a crash, recovery only needs to process transactions since the last checkpoint,
reducing recovery time significantly. [2]

End of Set 2

–9– 8824–EXAM © IB-style Practice Paper


Option A — Databases

Set 3 — HL Extension (A.4)


9. A city council is choosing a database model for a new geographic information system (GIS) to
manage road networks, parks, and utility lines.

(a)(i) Outline what is meant by the term spatial data. [2]


MODEL ANSWER
• Spatial data describes the location, position, shape, or spatial relationships of real-world
objects, usually represented using geographic coordinates (latitude/longitude) or a coordinate
system. [1]
• It can describe not only where an object is but also how objects relate spatially — distance,
adjacency, overlap, or containment — such as whether a road intersects a park boundary. [1]

(a)(ii) State two geometric object types that can be stored in a spatial database. [2]
MODEL ANSWER
• Point — represents a single location, such as a bus stop or a fire hydrant, stored as an (x, y)
coordinate pair.
• Polygon — represents an enclosed area defined by multiple connected vertices, such as a park
boundary or a land parcel.
• Also accept: Line / LineString (e.g., a road segment between two intersections). [1 each]

(b) Identify two characteristics of a network database model. [2]


MODEL ANSWER
• Data is organised as records connected by links (pointers) rather than tables, allowing multiple
parent-child paths between records.
• Supports many-to-many relationships directly, without a junction table — a record can have
multiple parents and multiple children.

(c) Discuss the advantages and disadvantages of an object-oriented database [5]


(OODB) compared to a relational database for the city's GIS system.
MODEL ANSWER
• Advantages of OODB: Handles complex, nested data types naturally — a Road object can
contain sub-objects like TrafficLights[] and intersects() methods, which would require multiple
tables in a relational model. Inheritance allows ParkLand to inherit from SpatialObject without
repeating shared attributes. Eliminates the object-relational impedance mismatch since GIS
software is written in OOP languages like Java/C++. [up to 3]
• Disadvantages of OODB: No standard universal query language — SQL is not natively
applicable. Weaker integrity enforcement (constraints embedded in object methods, relying on
developers). Less industry support, fewer DBA tools, and limited scalability compared to mature
relational systems. [up to 3]
• Evaluative conclusion: For a GIS with complex geometric objects, an OODB may offer modelling
advantages, but the lack of standardisation makes a spatial extension of a relational DB (PostGIS)
a more practical choice. [1]

Examiner tip: "Discuss" = structured argument both ways + evaluative statement. The context (GIS
complex objects) should steer your examples.

– 10 – 8824–EXAM © IB-style Practice Paper Turn over


10. A large supermarket chain operates a data warehouse that consolidates sales data from 300 stores
across 15 countries.

(a) Identify four key characteristics of a data warehouse. [4]


MODEL ANSWER
• Subject-oriented: data is organised around key business subjects (customers, products, sales)
rather than around transactions.
• Integrated: data from multiple source systems is consolidated into a single consistent format and
schema.
• Non-volatile: once loaded, data is not updated or deleted — it is read-only, preserving historical
records.
• Time-variant: data includes a time dimension, allowing trend analysis and historical comparisons
across months/years.

(b) Outline two advantages of using a data warehouse to store the supermarket's [4]
historical sales data.
MODEL ANSWER
• Historical trend analysis: the warehouse stores years of transaction data, allowing analysts to
identify seasonal patterns, compare year-on-year performance, and forecast demand — not
possible with operational databases that only hold current data. [2]
• No impact on operational systems: complex analytical queries run against the warehouse
rather than the live transaction database, so checkout and stock systems are not slowed down by
heavy reporting queries. [2]

(c) Describe the ETL process used to populate the supermarket's data warehouse. [6]
MODEL ANSWER
• Extract: Data is extracted from multiple source systems — POS terminals, inventory databases,
online orders — in various formats. The data is pulled into a staging area rather than directly into
the warehouse, to avoid corrupting it. [2]
• Transform: Rules are applied to standardise and clean the data: NULL values are filled, date
formats are unified (e.g., DD/MM/YYYY → YYYY-MM-DD), currency codes are normalised, and
duplicate records are removed. Only relevant attributes are kept. [2]
• Load: The cleaned, transformed data is loaded into the warehouse. This may occur in batch
(nightly) or in near-real-time using change data capture (CDC). Indexes and summary tables are
updated after loading. [2]

Examiner tip: ETL questions frequently appear in HL. Always describe all 3 stages with a specific example
for each — vague answers ("data is cleaned") score 1 not 2.

(d) Explain the difference between data mining and ETL. [2]
MODEL ANSWER
• ETL is the process of extracting, transforming, and loading data into the warehouse. Its purpose is
to prepare, clean, and organise data — it does not discover patterns.
• Data mining is performed on the already-prepared warehouse data to discover hidden patterns,
relationships, and predictions. ETL prepares the data; data mining extracts knowledge from it.

– 11 – 8824–EXAM © IB-style Practice Paper


11. A streaming company applies data mining techniques to its viewing data to improve recommendations
and detect subscription fraud.

(a) Explain why data mining is used to extract information from the company's viewing [4]
history database, rather than standard SQL queries.
MODEL ANSWER
• The viewing history contains millions of records with complex, non-obvious relationships that
cannot be expressed as predetermined SQL queries — data mining discovers patterns the analyst
did not know to look for. [1]
• Data mining reveals hidden associations: e.g., users who watch documentary series tend to
cancel after 3 months — a pattern not detectable with a simple WHERE clause. [1]
• It enables predictive modelling — using past behaviour to predict whether a specific user is likely
to churn, enabling proactive retention offers. [1]
• It can detect anomalous patterns indicative of fraud — e.g., a single account streaming
simultaneously from 8 different geographic locations, which standard queries would not flag. [1]

(b) Explain, using an example, how data matching could be applied to detect [4]
subscription sharing fraud.
MODEL ANSWER
• Data matching compares records across two or more datasets to find corresponding entries based
on shared identifiers or attributes. [1]
• The company matches its subscriber login logs (IP addresses, device IDs, timestamps) against
geographic IP databases and device registration records. [1]
• Example: A single account shows simultaneous logins from Singapore, Germany, and Brazil
within minutes — the matching algorithm flags this as suspicious because physical
account-sharing across continents is impossible for a single individual. [1]
• This triggers an automated review or account lock, and the subscriber is asked to verify their
identity before continuing. [1]

(c) Describe the process of deviation detection as it would be applied to the streaming [5]
company's subscription cancellation data.
MODEL ANSWER
• Deviation detection identifies data values that significantly differ from normal or expected
patterns. The process begins by establishing a baseline of normal behaviour. [1]
• The company calculates the mean and standard deviation of daily cancellations over the past
year. This forms the statistical norm. [1]
• If cancellations on a given day fall several standard deviations above the mean (e.g., 3× the
usual rate), that day is flagged as an outlier. [1]
• The flagged deviation is then investigated: was there a price increase announcement? A
competitor launch? A negative press article? This contextualises whether the deviation is an error
or a meaningful event. [1]
• The result informs decision-making — for example, a PR response or targeted retention campaign
for at-risk users. [1]

Examiner tip: 5-mark "describe the process" needs all stages: establish baseline → apply statistical test
→ flag outliers → investigate → act. Omitting the investigation step is the most common error.

– 12 – 8824–EXAM © IB-style Practice Paper Turn over


12. Europol is developing a data warehouse to analyse cross-border financial crimes.

(a) Outline two benefits of applying predictive modelling to the crime data warehouse. [4]
MODEL ANSWER
• Proactive resource allocation: by predicting where and when crime is statistically likely to
increase (based on historical trends, economic indicators, and seasonal patterns), Europol can
pre-deploy investigators to high-risk areas before crimes escalate. [2]
• Identifying at-risk individuals or networks: predictive models trained on past criminal profiles
can score new entities for likelihood of involvement in financial crime, allowing early-stage
intervention rather than post-hoc investigation. [2]

(b) Explain how link analysis can be applied to financial crime datasets to uncover [5]
money-laundering networks.
MODEL ANSWER
• Link analysis represents entities as nodes (individuals, companies, bank accounts) and
relationships as edges (financial transactions, shared ownership, communication). [1]
• Algorithms analyse the network graph to identify clusters of highly-connected nodes — dense
subgraphs that may represent organised crime groups or shell company networks. [1]
• The analysis identifies hub nodes (central figures) with unusually high numbers of connections —
these are likely key players (e.g., the account that receives funds from 50 different entities and
re-distributes to 30 others). [1]
• Example: Three accounts appear to circulate the same £100,000 in circular transactions
(A→B→C→A) across 72 hours — a pattern called "layering" flagged by link analysis even though
each individual transaction is below reporting thresholds. [1]
• Investigators use visualisation tools to map the full network, prioritise targets by centrality score,
and determine which entities to freeze or prosecute first. [1]

Examiner tip: Link analysis = graph theory applied to data. For full marks: nodes/edges definition + pattern
discovery + hub identification + example + investigation outcome.

(c) Evaluate the use of data mining techniques by a law enforcement agency. [6]
Consider both effectiveness and ethical concerns.
MODEL ANSWER
• Effectiveness: Data mining processes massive datasets that humans cannot manually analyse,
identifying non-obvious patterns. It enables real-time fraud detection (e.g., flagging suspicious
transactions within seconds). Predictive models can prevent crimes rather than just respond to
them. [3]
• Ethical concerns: Risk of algorithmic bias — if training data reflects historic discriminatory
policing, the model may disproportionately flag certain communities. Mass surveillance concerns
— data mining of public communications raises civil liberties issues. Lack of transparency: "black
box" models cannot explain why they flagged an individual, violating the right to a fair hearing.
Data used beyond its original purpose violates the purpose limitation principle under GDPR. [3]
• Evaluative conclusion: Data mining is a powerful enforcement tool but must be governed by strict
oversight, independent auditing, and legal safeguards (e.g., judicial approval for accessing
personal data) to prevent misuse.

Examiner tip: 6-mark evaluate = 3 marks effectiveness + 3 marks ethical concern + conclusion that
weighs both. Avoid listing only advantages.

– 13 – 8824–EXAM © IB-style Practice Paper


13. A telecommunications company uses a multi-dimensional database to analyse call volumes across
regions, time periods, and customer segments.

(a) Identify two characteristics of a multi-dimensional database model. [2]


MODEL ANSWER
• Data is stored in multi-dimensional arrays (data cubes) where each dimension represents a
different analytical perspective (e.g., time, location, product).
• Supports OLAP operations such as slice (select a single dimension value), dice (select a
subcube), drill-down (increase granularity), and roll-up (aggregate to higher level).

(b) The company uses a supervised machine learning model to classify customers [5]
likely to cancel their contract (churn prediction). Describe the steps to create this
model.
MODEL ANSWER
• Data collection: Gather labelled historical data — customer records where each row is tagged
"churned" or "retained" based on past outcomes. Features include call volume, contract duration,
complaints, payment history. [1]
• Data preparation: Clean data (remove nulls, fix errors), normalise numerical features, encode
categorical variables (e.g., region → one-hot encoding). Split into training (70–80%) and test
(20–30%) sets. [1]
• Model selection and training: Choose a suitable algorithm (decision tree, neural network,
logistic regression). Train the model on the training set — the algorithm learns which feature
combinations predict churn. [1]
• Evaluation: Test the trained model on the held-out test set. Measure accuracy, precision, recall,
and F1-score. Adjust model parameters (hyperparameters) to improve performance. [1]
• Deployment: Once accuracy is acceptable, deploy the model to score new customers monthly.
Retrain periodically as new data becomes available to prevent concept drift. [1]

(c) Compare the use of a decision tree and a neural network for predictive modelling [6]
of churn data in a relational database context.
MODEL ANSWER
• Decision tree interaction with database: Treats each database column as an explicit attribute.
Learns by scanning the database and evaluating splits (e.g., "CallsPerMonth < 10? → likely
churn"). The final model maps directly to SQL-readable conditions — interpretable and auditable.
Fast to retrain when new records are added. [3]
• Neural network interaction with database: Requires data to be extracted and converted to
numerical input vectors (preprocessing). Learns complex cross-attribute relationships
simultaneously through forward propagation and backpropagation. The model is a set of weights
— not directly interpretable as database conditions. Requires large datasets and full retraining
when data changes significantly. [3]
• Key trade-off: decision trees offer transparency and simplicity suitable for regulatory compliance;
neural networks offer higher accuracy on complex patterns but are "black boxes" that may not
satisfy audit requirements.

Examiner tip: "Compare" needs explicit contrast. Use language like "whereas", "in contrast", "unlike" to
make comparisons explicit. A list of features of each without contrast is Description, not Comparison.

End of Set 3 — End of Practice Paper

– 14 – 8824–EXAM © IB-style Practice Paper Turn over


All model answers are for self-assessment only. Marks shown are indicative of IB marking criteria.

– 15 – 8824–EXAM © IB-style Practice Paper

You might also like