Databases in the Real World: School Information Management System (MIS)

Flat-file databases store all information in a single table, causing duplicate data and dangerous update anomalies. Relational databases solve this by splitting data into linked tables connected by primary and foreign keys.

πŸ›οΈ
St Jude's Academy MIS β€’ Microsoft Access Database Engine Connected: StJudes_Records.accdb β€’ Academic Year 2026/27
SQL Connection: ACTIVE Staff: S. Miller (School Office)
πŸ›οΈ
ST JUDE'S ACADEMY β€’ EST. 1892

School Information Management System

Welcome to the central administrative database for St Jude's Academy. Manage student profiles, record GCSE course enrollments, track tutor groups, and inspect behind-the-scenes database storage architectures.

DATABASE ENGINE INSPECTION

How Does the School Store this Record Behind the Scenes?

Single Unnormalized Entity

School_Master_Records : Table (Access Datasheet View)

🟨 Repeated Data (Redundancy) πŸŸ₯ Inconsistent Data (Conflict) 14 Rows Stored

Every time a pupil enrolls in another subject, their name, home address, and tutor group are duplicated onto a brand new row. Editing one row without editing every other row produces fatal data conflicts!

#Row StudentID StudentName Residential Address Form Subject Teacher Room Row Actions

Relational Model: Two Normalized Linked Tables (1-to-Many Relationship)

Student personal details are stored strictly once in the Students parent table. The Enrollments child table records each pupil's course and target grade via StudentID (FK)β€”fully normalized without duplicate staff or room data!

Students Table StudentID (PK)
Enrollments Table StudentID (FK)
Parent Table

Students : Table (Access Datasheet View)

6 Pupils Registered

Primary Key: StudentID. Each student occupies exactly one single row. Updating an address here is atomic and permanentβ€”conflicting addresses are mathematically impossible!

StudentID PK StudentName DOB Residential Address Form Emergency Phone Enrollments
Child Table

Enrollments : Table (Access Datasheet View)

14 Course Enrollments

Primary Key: EnrollmentID | Foreign Key: StudentID. Each record represents a pupil's subject enrollment and target grade. Removing Teacher & Room keeps this 2-table model fully normalized for GCSE without duplicating staff data.

EnrollmentID PK StudentID FK Subject Target Grade Status
DATABASE ENGINE INSPECTOR & EXAM ANOMALY LAB

Live Storage Diagnostics & Real-World Anomaly Testing

Observe how backend storage models behave when records are updated, added, or deleted. Test how flat-file spreadsheets fail compared to normalized relational databases.

18 Redundant Data Cells Addresses & details duplicated across multiple rows.
100% Data Consistency Rating All duplicate rows currently match.
+65% Storage Overhead Wasted disk space due to repeated text.
Demonstrate Exam Anomalies: Test how single spreadsheets fail when data changes:
AQA Β§3.7.1

Data Redundancy

Unnecessary duplication of data. In a flat-file database, storing pupil addresses 3–5 times consumes extra storage space and slows backups. Relational databases eliminate redundancy by storing personal details strictly once in a parent entity.

Core Exam Trap

The 3 Database Anomalies

β€’ Update Anomaly: Changing data in 1 row leaves older data in other rows (inconsistent records).
β€’ Deletion Anomaly: Deleting a subject accidentally erases the student's entire profile.
β€’ Insertion Anomaly: Cannot record a new subject until a student enrolls onto it.

Key Concept

Primary & Foreign Keys

β€’ Primary Key (PK): A field that uniquely identifies each record in its table (e.g. StudentID).
β€’ Foreign Key (FK): A primary key from another table used to establish a relationship without repeating full personal details.

Relational Database & SQL Query Workbench

Structured Query Language (SQL) is the standard declarative language used to search, filter, and extract data from relational tables. Using commands like SELECT, FROM, and WHERE, queries retrieve exact matching records without altering the underlying data.

Why Do We Need Relational Databases?

Imagine writing a student's full name, address, and form group next to every single exam they ever sit. If Alice takes 10 exams, her details would be repeated 10 times! If she moves house, updating 10 rows risks errors. In a Relational Database, we store student details once in the Students table, and link their exam results using a Foreign Key.

Tables and Records

A table holds records (rows) and fields (columns). Separating tables prevents data redundancy (unnecessary duplication).

Primary vs Foreign Keys

Primary Key (PK): Unique ID in its own table.
Foreign Key (FK): Links back to the PK of another table to connect records.

The 4 AQA SQL Commands
SELECT (which columns) β€’ FROM (which table)
WHERE (filter condition) β€’ ORDER BY (sort ASC/DESC)

Relational Tables & Keys

PK = Primary Key FK = Foreign Key
Students (Entity: Student Details) 7 records
StudentID PK FirstName LastName YearGroup FormGroup
ExamResults (Entity: Assessment Scores) 8 records
ResultID PK StudentID FK Subject Grade Score
Relationship: ExamResults.StudentID FK links to Students.StudentID PK (One student can have many exam results).
Studio Mode:

AQA SQL Builder

SELECT β€’ FROM β€’ WHERE β€’ ORDER BY
Starter Queries: (Click any query to run instantly)
Ready.

Query Results

0 rows returned

Query Execution Plan

How the database engine parsed and executed your SQL statement:

Relational Database Revision & Exam Traps

Key definitions, table relationships, and SQL exam traps for Paper 2 (Β§3.7). Review primary vs foreign keys, entity-relationship models, data redundancy, and standard SQL syntax.

Key Exam Traps & Core Concepts

EXAM DEFINITION 1: RELATIONAL KEYS

Primary Key vs Foreign Key

Examiners frequently ask for definitions of primary and foreign keys. Be precise with your wording:

Primary Key (PK):
β€’ A field (or attribute) that uniquely identifies each individual record in a table.
β€’ Example: StudentID in the Students table.
Foreign Key (FK):
β€’ An attribute in one table that is the primary key of another table, used to establish a link/relationship between the two tables.
β€’ Example: ExamResults.StudentID.
Mark Scheme Tip: Never say a foreign key is just "a key in another table". You must state it is a primary key from one table placed into another to create a relationship.
EXAM TRAP 2: DATA INTEGRITY

Why Split Data into Multiple Tables? (Flat File vs Relational)

A classic 3-mark question: "Explain one advantage of using a relational database rather than a flat-file database."

β€’ Reduces Data Redundancy: Data is not duplicated unnecessarily across multiple rows.
β€’ Prevents Update Inconsistencies: If Alice changes form room, it is updated in one place only (in the Students table), rather than across 10 different exam entries.
β€’ Smaller File Size & Faster Queries: Less duplicate text means less storage used.
EXAM TRAP 3: SQL SYNTAX RULES

Quotes Around Strings vs Numbers

In SQL, text and character data types must always be wrapped in single quotes ('Computing' or '11A'). Numeric integers (such as Score >= 80 or YearGroup = 11) must not have quotes.

βœ“ Correct: WHERE Subject = 'Computing' AND Score >= 80
βœ— Wrong: WHERE Subject = Computing AND Score >= '80'

Exam Style Questions with Mark Schemes

Databases β€’ 1 Mark

Q1: Define what is meant by a foreign key in a relational database.

[1 mark] A primary key from one table that is included in another table to establish a link/relationship between the two tables.
Relational Design β€’ 2 Marks

Q2: State two reasons why a school would use a relational database with separate Students and ExamResults tables rather than a single flat-file spreadsheet.

[1 mark] Any one from: Prevents data redundancy / reduces duplication of student records.
[1 mark] Any one from: Avoids update anomalies / if student details change, they only need to be updated in one place (the Students table).
SQL Syntax β€’ 3 Marks

Q3: Write an SQL statement to retrieve the subject and score of all exam results from the ExamResults table where the score is greater than 80, ordered by score from highest to lowest.

SELECT Subject, Score FROM ExamResults WHERE Score > 80 ORDER BY Score DESC
[1 mark] SELECT Subject, Score FROM ExamResults
[1 mark] WHERE Score > 80
[1 mark] ORDER BY Score DESC