Topic module

Database Modelling, Querying and Programming

Designing a data model and using database operations to store, retrieve, update and protect related data consistently.

Long-form learning
Concept to Risk to Memory to Check-up

How to study A-level Computer Science

Define the problem and representation, trace the state change, justify the algorithm or architecture, then test the result against requirements, evidence and constraints.

Core concepts

Concept 1

A data model defines entities, attributes, relationships, identifiers and constraints for the problem domain.

Exam cue: Derive entities and relationships from requirements before drawing a schema.

Concept 2

Relational design uses keys, tables and normalisation to reduce inappropriate redundancy and update anomalies.

Exam cue: Trace functional dependencies and anomalies when justifying normalisation.

Concept 3

Database programming expresses selection, projection, joins, aggregation and controlled modification while preserving integrity.

Exam cue: State how a query combines tables, filters rows and selects or aggregates fields.

Risk pitfalls and guardrails

Using a non-unique descriptive field as a primary key.

Guardrail: Do not substitute a memorised definition or generic advantage until you have identified the input, state, stakeholder and constraint in the task.

Normalising mechanically without checking the required dependencies.

Guardrail: Do not substitute a memorised definition or generic advantage until you have identified the input, state, stakeholder and constraint in the task.

Building a query by concatenating untrusted input.

Guardrail: Do not substitute a memorised definition or generic advantage until you have identified the input, state, stakeholder and constraint in the task.

Memory anchors

Primary Key

A primary key uniquely identifies each row in a relation.

Foreign Key

A foreign key references a candidate key in another or the same relation.

Normalisation

Normalisation restructures relations to reduce dependency-driven redundancy and anomalies.

Join

A join combines related rows according to a condition.

Transaction

A transaction groups database operations into one controlled unit of work.

Checkpoint rule

Do the check-up only after you can summarize each concept in one sentence and identify one dangerous pitfall from memory.

Knowledge Check (after reading)

Short check-up to confirm understanding of this module.

Check-up Questions

1-2 question checkpoint

A relation needs one attribute that distinguishes every stored student row. Which description gives the primary key's purpose?

An `Order` row stores a `customerId` that links to `Customer`. Which description correctly identifies this foreign key?

Answer all questions to submit.

Next step personalized recommendations

What is Pass Harbor?

Completely free exam prep for 247 UK exams.

  • Practice questions
  • Flashcards
  • Study guides
  • Mock exams
  • No registration
  • No paywall
  • Start instantly
No more expensive exam prep. Quality study tools should be accessible to everyone.