CGP, PG Online, and more
Amazon amazon.co.uk
Python Books
Beginner to advanced Python
Amazon amazon.co.uk
Raspberry Pi Kits
For programming projects
Amazon amazon.co.uk
Fastmail β€” Private Email
Privacy-first email with no ads and no tracking
fastmail.com
Dynadot β€” Domain Registration β†’
Register or transfer domains with free SSL and affordable pricing
dynadot.com
Zen Internet β€” UK Broadband β†’
Award-winning UK broadband with no data caps and great customer service
zen.co.uk
CS Revision Guides

Boolean Logic and Relational Databases

Year 1 / ASYear 2 / A-Level All Boards (AQA, Edexcel, OCR, WJEC, CCEA) AQA

A-Level Computer Science revision: Boolean Logic and Relational Databases. Learning objectives, key points, worked examples and practice questions across AQA, Edexcel, OCR, WJEC and CCEA.

Fastmail

πŸ“Œ Key Points

Key Fact: Boolean laws: Identity, Null, Idempotent, Complement, Commutative, Associative, Distributive, De Morgan, Absorption
Key Fact: K-maps: 2-4 variables, groups of 1s (SOP) or 0s (POS); don't cares
Key Fact: Circuits: Half adder (XOR+AND), Full adder (2 half + OR), MUX (select), Decoder (binary->one-hot)
Key Fact: Flip-flops: SR (set/reset), D (data), JK (toggle); Registers: shift, storage; Counters: async/sync
Key Fact: ER: entities, attributes, relationships (1:1, 1:N, M:N), keys (PK, FK, CK)
Key Fact: Normalisation: 1NF (atomic), 2NF (no partial FD), 3NF (no transitive FD), BCNF (det⇒cand key)
Key Fact: SQL: SELECT...FROM...WHERE...GROUP BY...HAVING...ORDER BY; JOINs (INNER, LEFT, RIGHT, FULL)
Key Fact: Aggregation: COUNT, SUM, AVG, MIN, MAX; Subqueries; ACID: Atomicity, Consistency, Isolation, Durability
Key Fact: Concurrency: locks (shared/exclusive), deadlock, 2PL; Indexes: B-tree, hash; Query optimisation

🎯 Learning Objectives

  • Construct and simplify Boolean expressions using laws (De Morgan, distribution, absorption)
  • Design combinational logic circuits: adders, multiplexers, decoders
  • Understand sequential logic: flip-flops (SR, D, JK), registers, counters
  • Design relational databases: ER modelling, normalisation (1NF, 2NF, 3NF, BCNF)
  • Write SQL: DDL (CREATE, ALTER), DML (SELECT, INSERT, UPDATE, DELETE), joins, aggregation
  • Understand ACID properties, transactions, concurrency control, indexing

πŸ’‘ Worked Example

Exam-Style Question

Question: Normalise to 3NF: Student(StudentID, Name, CourseID, CourseName, TutorID, TutorName)

Model Answer:

FDs: StudentID->Name, CourseID->CourseName, TutorID, TutorID->TutorName. 1NF: atomic. 2NF: remove partial FD (CourseID->CourseName). Course(CourseID, CourseName, TutorID), Tutor(TutorID, TutorName), Student(StudentID, Name, CourseID). 3NF: remove transitive FD (TutorID->TutorName). Already in 3NF

❓ Practice Questions

Questions:

  • Simplify: AΒ·(A+B) + AΒ·B
  • Design full adder from half adders
  • Draw ER for library system
  • Write SQL: students with avg grade > 70
  • Explain ACID with examples

🎬 Video Resources

πŸ“„ Past Papers & Exam Resources

πŸ”— Further Reading & Resources

πŸ“š Lesson Plan (50 minutes)

  1. Starter (5 min): Recall prior knowledge of boolean logic and relational databases with quick questions.
  2. Teaching (15 min): Work through each of the learning objectives, explaining principles step by step.
  3. Key points review (5 min): Revisit the key points together, confirming understanding.
  4. Worked example (10 min): Model the example question: Normalise to 3NF: Student(StudentID, Name, CourseID, CourseName, TutorID, TutorName). Solution: FDs: StudentID->Name, CourseID->CourseName, TutorID, TutorID->TutorName. 1NF: atomic. 2NF: remove partial FD (CourseID->CourseName). Course(CourseID, CourseName, TutorID), Tutor(TutorID, TutorName), Student(StudentID, Name, CourseID). 3NF: remove transitive FD (TutorID->TutorName). Already in 3NF
  5. Practice (10 min): Students attempt the practice questions independently; circulate and support.
  6. Plenary (5 min): Review answers and address misconceptions.

🏠 Homework

  • Simplify: AΒ·(A+B) + AΒ·B
  • Design full adder from half adders
  • Draw ER for library system
  • Write SQL: students with avg grade > 70
  • Explain ACID with examples

🧾 Assessment

Check practice answers against the model answer; use the built-in practice questions as formative assessment.