A-Level Revision Guides
All subjects covered
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
A-Level Revision Aid: This resource is designed to support your revision. Content may contain errors. If you find a discrepancy with your class teaching, your teacher is correct β€” please let us know at alevelrevise@scott.scottrix.co.uk.

Networks and Databases

Year 1 / ASYear 2 / A-Level AQA, OCR, WJEC/Eduqas

Exam-focused AQA 7517, OCR H446 and WJEC/Eduqas revision for networks and databases: TCP/IP stack, protocols, DNS and IP addressing, plus relational databases with worked SQL queries, normalisation to 3NF and ACID transactions.

Fastmail

🎯 Learning Objectives

πŸ“‹ Key Definitions and Core Concepts

LAN: Local Area Network: a network over a small geographic area (one site), owned by the organisation, with high bandwidth and low latency.
WAN: Wide Area Network: a network spanning large geographic areas using third-party infrastructure (e.g. leased lines); the internet is the largest WAN.
Protocol: An agreed set of rules governing communication between devices, defining format, ordering and error handling.
TCP: Transmission Control Protocol: a connection-oriented, reliable transport protocol with sequencing, acknowledgements, flow and congestion control.
UDP: User Datagram Protocol: a connectionless transport protocol with no delivery guarantee, ordering or handshake β€” low overhead and latency.
DNS: Domain Name System: the hierarchical distributed service resolving domain names to IP addresses via root, TLD and authoritative servers.
Primary key: An attribute (or combination) uniquely identifying each record in a table; never null and never duplicated.
Foreign key: An attribute in one table that references the primary key of another, creating the link between tables and enforcing referential integrity.
Normalisation: The process of structuring tables to remove redundancy: 1NF atomic values, 2NF no partial dependencies, 3NF no transitive dependencies (AQA 4.6.2).
Transaction: A sequence of database operations treated as one indivisible unit: it either completes fully (commit) or has no effect at all (rollback).

πŸ“Œ Key Points

Topologies: star (central switch β€” easy to add nodes, hub is single point of failure), bus (shared cable β€” collisions), mesh (redundant paths)
TCP/IP stack: Application (HTTP, DNS, FTP, SMTP), Transport (TCP/UDP), Internet (IP routing), Link (Ethernet, WiFi) (AQA 4.5.4)
TCP: connection-oriented, 3-way handshake (SYN, SYN-ACK, ACK), sequencing, retransmission, flow/congestion control; UDP: connectionless, no guarantees, low latency
DNS: resolver asks root β†’ TLD (.co.uk) β†’ authoritative server; recursive vs iterative queries; records A, AAAA, MX, CNAME
IPv4: 32-bit dotted decimal with subnet mask/CIDR (/24 = 24 network bits); IPv6: 128-bit hex, vast address space (AQA 4.5.2)
Relational DB: entity = table, attribute = column; 1:1, 1:N, M:N relationships resolved with link tables; PK/FK enforce referential integrity (AQA 4.6.1)
Normalisation: 1NF atomic, 2NF no partial FD on part of a composite key, 3NF no transitive FD (AQA 4.6.2)
SQL: SELECT ... FROM ... WHERE ... GROUP BY ... HAVING ... ORDER BY; JOIN ... ON; COUNT/SUM/AVG (AQA 4.6.3)
ACID: Atomicity (all-or-nothing), Consistency (valid state to valid state), Isolation (concurrent transactions do not interfere), Durability (committed changes survive crashes)

Network fundamentals and the TCP/IP stack

Topologies (AQA 4.5.2, WJEC 1.7): star β€” every node connects to a central switch; easy to add nodes, one cable fault isolates only that node, but the switch is a single point of failure; bus β€” all nodes share one backbone cable; cheap but collisions rise with traffic and a backbone break kills the network; mesh β€” nodes interconnect (full or partial); redundant paths give fault tolerance at the cost of cabling; ring β€” nodes in a loop with token passing. The exam pattern: given a scenario (school, office, safety-critical), name the best topology and justify with cost, fault tolerance and expansion.

LAN vs WAN β€” the one-marker pair: a LAN spans one site, is owned by the organisation, and has high bandwidth/low latency; a WAN spans large distances using third-party (telecom) infrastructure β€” leased lines and the internet. Client-server vs peer-to-peer: client-server centralises services (files, databases, email) on dedicated servers β€” central control, security and backups, but the server is a cost and a bottleneck; peer-to-peer shares resources directly between equals β€” cheap for small networks but no central control, and security/backup are per-machine.

The TCP/IP stack (AQA 4.5.4, OCR 1.3.3) has four layers, each using the layer below and serving the layer above:

LayerRoleProtocols
ApplicationProvides network services to programsHTTP/HTTPS, DNS, FTP, SMTP, IMAP
TransportEnd-to-end delivery, port numbers, reliabilityTCP, UDP
InternetRouting packets between networks by IP addressIP, ICMP
LinkPhysical transmission on the local network (frames, MAC addresses)Ethernet, WiFi

The two examinable points: (1) layering β€” each layer's services are independent of the implementation of the others, so a protocol can change (WiFi to Ethernet) without touching the layers above, and the same stack works over any physical medium; (2) encapsulation β€” data moves down the stack gaining a header at each layer (TCP header with ports and sequence numbers, IP header with addresses, Ethernet frame with MAC addresses) and the headers are stripped back off at the receiver. Exam question pattern: 'Explain the purpose of each layer of the TCP/IP stack.' Answer: application provides user-facing services; transport provides end-to-end delivery with ports and (with TCP) reliability; internet routes packets across networks by IP; link handles transmission over the physical local network.

Devices to know by role: a switch forwards frames within a LAN using MAC addresses; a router forwards packets between networks using IP addresses; a firewall filters traffic by rules; a wireless access point joins wireless clients to the wired LAN.

Key protocols: TCP vs UDP, DNS, HTTP, IP addressing

TCP vs UDP is the highest-frequency comparison in this topic (AQA 4.5.2, OCR 1.3.3). TCP is connection-oriented: a three-way handshake (client SYN β†’ server SYN-ACK β†’ client ACK) establishes the connection; segments are numbered and acknowledged, lost segments are retransmitted, and flow/congestion control pace the sender. UDP is connectionless: no handshake, no ordering, no retransmission β€” just datagrams with ports. The trade-off sentence to quote: TCP guarantees delivery and order at the cost of overhead and latency; UDP has minimal overhead and latency but no guarantees.

Application matching is the standard follow-up: web pages, file transfer and email need every byte intact and in order β€” TCP. Live video, voice and online games prefer UDP β€” a lost packet is a momentary glitch, and retransmitting an outdated frame would arrive too late to be useful; DNS queries also use UDP (single small request-response, retried on failure). The exam pattern: 'Explain why UDP rather than TCP is used for live video streaming.' Answer: streaming tolerates small losses but not delay; TCP's retransmission of lost packets would stall playback with late-arriving data, whereas UDP delivers what arrives immediately β€” lower latency, and a dropped frame is preferable to a delayed one.

DNS resolution (AQA 4.5.2) β€” learn the sequence:

  1. The client asks its configured recursive resolver (ISP's DNS server) for www.example.co.uk.
  2. The resolver asks a root server, which replies with the address of the .co.uk TLD server.
  3. The resolver asks the TLD server, which replies with the authoritative name server for example.co.uk.
  4. The resolver asks the authoritative server, which returns the IP address (an A record for IPv4, AAAA for IPv6).
  5. The resolver caches the answer (with a TTL) and returns it to the client, which connects to that IP.

Records to name: A (name β†’ IPv4), AAAA (name β†’ IPv6), MX (mail server), CNAME (alias). HTTP/HTTPS: HTTP is a request-response application protocol (GET, POST, status codes); HTTPS is HTTP over TLS β€” the handshake exchanges certificates and establishes session keys before any data flows, giving confidentiality and server authentication. Exam one-liner: HTTPS encrypts the traffic and proves the server's identity via a CA-signed certificate, protecting against eavesdropping and man-in-the-middle attacks.

IP addressing: IPv4 is 32-bit, written dotted decimal (192.168.1.0), with a subnet mask splitting network bits from host bits. CIDR notation appends the network-bit count: /24 = 255.255.255.0 = 24 network bits, 8 host bits, 254 usable hosts. Worked subnetting (the exact exam pattern):

Subnet 192.168.1.0/24 into 4 equal subnets:
  4 subnets need 2 more network bits: /24 -> /26
  New mask: /26 = 255.255.255.192
  Subnets: 192.168.1.0/26    (hosts .1 - .62)
           192.168.1.64/26   (hosts .65 - .126)
           192.168.1.128/26  (hosts .129 - .190)
           192.168.1.192/26  (hosts .193 - .254)

Method: doubling the number of subnets adds one bit to the mask; each subnet's size halves (here 64 addresses, 62 usable β€” subtract the network and broadcast addresses). IPv6 exists because 32-bit IPv4 exhausted its ~4.3 billion addresses; IPv6 is 128-bit hex, eliminating the need for NAT, with hierarchical routing and built-in support for autoconfiguration.

Relational databases: entities, keys and integrity

A relational database stores data in tables (relations): each table is an entity, each column an attribute, each row a record. Relationships between tables are 1:1, 1:N or M:N, and the examinable design rule: an M:N relationship must be resolved with a link (junction) table β€” e.g. Student ↔ Course is M:N, so create Enrolment(StudentID, CourseID) referencing both.

Keys (AQA 4.6.1, OCR 1.3.2): a primary key uniquely identifies each record (never null, never duplicated); a candidate key is any attribute that could serve as the primary key; a foreign key in one table references the primary key of another, forming the link; a composite key combines two or more attributes (link tables commonly use (StudentID, CourseID) as a composite PK). Referential integrity is the constraint that every foreign key value must match an existing primary key in the referenced table β€” you cannot enrol a student who does not exist, and deleting a course must be restricted or cascade to its enrolments. The exam pattern: 'Explain how the design enforces referential integrity.' Answer: the FK in the child table references the PK of the parent; the DBMS rejects inserts/updates with FK values that have no matching PK, and deletion of a referenced parent is restricted or cascades.

Why relational at all β€” the 4-marker: data is stored once (no redundancy), so updates happen in one place and cannot disagree; integrity is enforced by keys and constraints; SQL gives a declarative query language independent of storage; and tables scale to complex many-to-many structures via link tables. Contrast with flat files worth one line: a flat file repeats data across records, so it suffers update anomalies (change a name in one record, disagree with another) and has no built-in integrity.

Normalisation to 3NF

Normalisation (AQA 4.6.2, WJEC 1.9) structures tables to eliminate redundancy. The stages, in mark-scheme wording:

Worked example β€” normalise Student(StudentID, Name, CourseID, CourseName, TutorID, TutorName):

Functional dependencies:
  StudentID  -> Name, CourseID
  CourseID   -> CourseName, TutorID      // course determines its tutor
  TutorID    -> TutorName

1NF: all values atomic - already satisfied.

2NF: key is StudentID alone (no composite key), so no partial
     dependencies are possible - already in 2NF.

3NF: CourseName and TutorID depend on CourseID, a non-key attribute
     -> transitive dependency. TutorName depends on TutorID, another
     non-key attribute -> transitive dependency. Split:

  Student(StudentID, Name, CourseID)
  Course(CourseID, CourseName, TutorID)
  Tutor(TutorID, TutorName)

Step-by-step reasoning to reproduce: (1) list the functional dependencies; (2) check 1NF β€” atomic values; (3) check 2NF β€” only relevant when a composite key exists, so with a single-attribute key the table is automatically in 2NF (a point that earns the 'explain why 2NF was trivially satisfied' mark); (4) check 3NF β€” any non-key attribute determined by another non-key attribute must move out with its determinant; (5) verify the final tables: each stores one entity, linked by foreign keys, with zero redundancy β€” CourseName appears once however many students take the course.

The benefits to quote in the 4-marker: no redundancy (each fact stored once), so no update anomalies (changing a tutor's name updates one row); no insertion anomalies (a new course can be added with no students yet); no deletion anomalies (deleting the last student does not erase the course). A second worked pattern β€” a composite key case: OrderLine(OrderID, ProductID, ProductName, Quantity) β€” ProductName depends on ProductID alone (part of the composite key OrderID+ProductID), a partial dependency, so 2NF splits out Product(ProductID, ProductName). Exam question pattern: 'Explain the difference between 2NF and 3NF.' Answer: 2NF removes partial dependencies β€” non-key attributes depending on part of a composite key; 3NF additionally removes transitive dependencies β€” non-key attributes depending on other non-key attributes; both only apply to tables already in the previous normal form.

SQL and transactions

SQL (AQA 4.6.3, OCR 1.3.2) is declarative β€” you specify what data, not how to retrieve it. The SELECT skeleton, in evaluation order:

SELECT attributes          // 5. project the columns
FROM tables                // 1. source tables
WHERE condition            // 2. filter rows
GROUP BY attributes        // 3. aggregate rows into groups
HAVING condition           // 4. filter groups
ORDER BY attributes        // 6. sort the result

Worked query 1 β€” students with an average grade above 70 (the exact existing exam pattern):

SELECT s.Name
FROM Student s
JOIN Grade g ON s.StudentID = g.StudentID
GROUP BY s.StudentID, s.Name
HAVING AVG(g.Mark) > 70;

Step-by-step: JOIN pairs each student with their grades via the foreign key; GROUP BY collapses to one row per student; AVG computes each student's mean; HAVING filters groups β€” the marking subtlety is that WHERE cannot contain AVG because WHERE runs before grouping; HAVING runs after.

Worked query 2 β€” multi-table join returning details:

SELECT s.Name, c.CourseName, t.TutorName
FROM Student s
JOIN Course c ON s.CourseID = c.CourseID
JOIN Tutor t ON c.TutorID = t.TutorID
WHERE s.Name LIKE 'A%'
ORDER BY c.CourseName, s.Name;

Each JOIN follows one FK link (Student→Course→Tutor); LIKE 'A%' matches names starting with A (% is the wildcard); ORDER BY sorts by course then name. Worked query 3 — DML:

INSERT INTO Student (StudentID, Name, CourseID)
VALUES (2214, 'Ada', 'CS01');

UPDATE Student SET CourseID = 'CS02' WHERE StudentID = 2214;

DELETE FROM Student WHERE StudentID = 2214;

Marking points: UPDATE/DELETE without WHERE affects every row β€” the classic catastrophic one-marker; INSERT must supply every non-null column and respect FK constraints.

Transactions and ACID (AQA 4.6.2, OCR 1.3.2): a transaction is a group of operations treated as indivisible. The four properties, each with its example:

Concurrency failure modes to name: a lost update (two transactions read the same value, both write, one overwrites the other), an inconsistent read, and deadlock (two transactions each hold a lock the other needs β€” neither proceeds; the DBMS detects and aborts one). Exam pattern: 'Explain why a ticket-booking system must use transactions.' Answer: booking decrements availability and creates the booking β€” if the system crashes between them the data is inconsistent, so atomicity requires both to succeed or both to roll back; concurrent bookings of the last seat must be isolated so only one succeeds; committed bookings must be durable.

πŸ’‘ Worked Example

Exam-style: A school database has tables: Student(StudentID, Name, CourseID) Course(CourseID, CourseName) Enrolment(StudentID, CourseID) -- M:N link table Grade(StudentID, AssessmentID, Mark) (a) Write an SQL query to return the name of every student on the course named 'Computer Science', sorted by name. [4 marks] (b) Write an SQL query to return each CourseName with the number of students enrolled on it. [4 marks]
Mark-scheme logic: (a) SELECT s.Name FROM Student s JOIN Enrolment e ON s.StudentID = e.StudentID JOIN Course c ON e.CourseID = c.CourseID WHERE c.CourseName = 'Computer Science' ORDER BY s.Name; Award: correct FROM with both joins following the FK links (1), join conditions matching StudentID and CourseID (1), WHERE on CourseName (1), ORDER BY s.Name (1). (b) SELECT c.CourseName, COUNT(*) FROM Course c JOIN Enrolment e ON c.CourseID = e.CourseID GROUP BY c.CourseName; Award: JOIN via CourseID (1), COUNT (1), GROUP BY CourseName (1), correct overall structure (1). Note: courses with zero enrolments would be omitted β€” a LEFT JOIN from Course to Enrolment with COUNT(e.StudentID) would include them with 0, which is the extension examiners credit.

❓ Practice Questions & Mark Schemes

Subnet 192.168.1.0/24 into 4 equal subnets. Give the new subnet mask and the network address of the first two subnets. [4 marks]
Answer: 4 subnets need 2 additional network bits, so the mask moves from /24 to /26 (1). /26 = 255.255.255.192 (1). First subnet network address: 192.168.1.0/26 (1). Second: 192.168.1.64/26 (1). Each subnet holds 64 addresses (62 usable hosts β€” network and broadcast addresses excluded); the subnets start at 0, 64, 128, 192 in the last octet.
Explain why UDP rather than TCP is often used for live video streaming. [3 marks]
Answer: Live streaming tolerates small packet losses (a momentary glitch) but not delay (1). TCP retransmits lost packets, so late-arriving data would stall playback, and its handshake/acknowledgements add overhead and latency (1). UDP is connectionless with no retransmission or ordering, so packets are delivered immediately as they arrive β€” a dropped frame is preferable to a delayed one (1).
Describe the steps a DNS resolver takes to translate www.example.co.uk into an IP address. [4 marks]
Answer: The resolver asks a root server, which returns the address of the .co.uk TLD server (1). The resolver asks the TLD server, which returns the authoritative name server for example.co.uk (1). The resolver asks the authoritative server, which returns the IP address in an A (or AAAA) record (1). The resolver caches the result with a TTL and returns it to the client (1). Order matters: root, then TLD, then authoritative.
Normalise to 3NF: OrderLine(OrderID, ProductID, ProductName, Price, Quantity), where the primary key is (OrderID, ProductID) and ProductName and Price depend on ProductID alone. [5 marks]
Answer: 1NF: all attributes atomic β€” satisfied (1). 2NF: ProductName and Price depend only on ProductID, part of the composite key β€” a partial dependency (1), so split them out with their determinant: Product(ProductID, ProductName, Price), OrderLine(OrderID, ProductID, Quantity) (1). 3NF: no non-key attribute depends on another non-key attribute β€” satisfied (1). Final design has no redundancy: product details are stored once whatever the number of orders (1).
Explain the ACID properties of a transaction, using a bank transfer (debit one account, credit another) as the example. [6 marks]
Answer: Atomicity: the transaction is indivisible β€” both the debit and the credit complete or neither does; a crash between them triggers rollback to the original state (2 marks: property + example). Consistency: the database moves from one valid state to another β€” constraints and the invariant that total funds are unchanged hold before and after (1). Isolation: concurrent transactions do not interfere β€” two simultaneous transfers on the same account are serialised by locks so neither reads a half-applied state (1). Durability: once committed, the transfer survives a crash β€” a write-ahead log allows committed changes to be recovered (1). One further point: without ACID a mid-transfer failure could debit without crediting, losing money (1).
Write an SQL query to return the total marks scored by the student named 'Scott' across all assessments, assuming tables Student(StudentID, Name) and Grade(StudentID, AssessmentID, Mark). [4 marks]
Answer: SELECT SUM(g.Mark) FROM Student s JOIN Grade g ON s.StudentID = g.StudentID WHERE s.Name = 'Scott'; Award: JOIN on the foreign key (1), WHERE filtering to the student (1), SUM aggregation (1), correct structure (1). A common error is grouping unnecessarily β€” with a single student filtered by WHERE, GROUP BY is not needed; AVG would give the mean rather than the total.

🎬 Video Resources

πŸ“„ Past Papers & Exam Resources

πŸ”— Further Reading & Resources

🧠 Flashcards (Spaced Repetition)

πŸ“ Exam Questions by Topic

🎯 Target Tests (Auto-Graded)

πŸŽ“ Smart Lesson (Guided)