Revision Notes
Cambridge A Level Computer Science (9618): Database Concepts – Revision Notes
Condensed notes on file-based limits, keys, relationships, E-R diagrams and 1NF to 3NF for Cambridge AS Computer Science 9618 8.1, with a self-test.
- Subject
- Computer Science
- Level
- AS LEVEL
- Topic
- Topic 8: Databases
- Author
- Marlbridge Academic Team
- Updated
- Reviewed by
- Harris Khan (what this means)
Aligned to Cambridge A Level Computer Science (9618), 2026. Official specification .
Syllabus page (what it covers and how it is assessed): Cambridge A Level Computer Science.
Syllabus points this page covers
9618 (AS Level)
- 8.1 Database Concepts
Found an error? Report a correction.
Need help with this topic? Request a free trial class for A Level Computer Science (9618).
Quick-recall notes for 8.1 Database Concepts (AS content, Paper 1). The Database Concepts study guide works through a full example; the Database Concepts practice questions give exam-style practice. The DBMS itself is in the DBMS revision notes.
File-based limitations and the relational fix
| File-based limitation | What it means | Relational fix |
|---|---|---|
| Data redundancy | Same data stored in several places | Each fact stored once, tables linked by keys |
| Data inconsistency | Copies disagree after an update | One copy, so one update is seen by all |
| Data dependence | Programs built around file layout; change the file, rewrite the programs | Programs use the DBMS, so structure can change independently |
| Hard to combine data | New program needed for each cross-file question | Tables joined in queries |
| Poor security and integrity | Whole file open or closed; no central rules | Access rights and integrity rules enforced centrally |
Key terms
| Term | Definition |
|---|---|
| Entity | Something about which data is stored, e.g. a pupil |
| Table | Holds the data about one entity, in rows and columns |
| Record / tuple | One row: the data about one instance of the entity |
| Field / attribute | One column: one item of data about each instance |
| Candidate key | Attribute (or minimal set) unique for every record; could be the primary key |
| Primary key | The candidate key chosen to identify each record uniquely |
| Secondary key | A candidate key not chosen as primary key; used for searching, often indexed |
| Foreign key | Attribute in one table that is the primary key of another, forming the link |
| Composite key | Primary key made of two or more attributes |
| Referential integrity | Every foreign key value matches an existing primary key value |
| Index | Ordered list of key values with record locations, for fast searching and sorting |
Relationships
- 1:1: one record links to one, e.g. teacher and their own room.
- 1:M: one record links to many, e.g. one pupil has many lessons. Foreign key goes in the “many” table.
- M:M: e.g. pupils and teachers. Cannot be stored directly; resolve with a link table (e.g. LESSON) holding both keys, giving two 1:M relationships.
E-R diagram: entities as labelled rectangles; lines show relationships; crow’s foot (three prongs) marks the “many” end.
Normal forms
| Form | Test | Fix |
|---|---|---|
| 1NF | No repeating groups; atomic values; primary key exists | One row per instance; choose a key |
| 2NF | 1NF, and no non-key attribute depends on only part of a composite key | Move partially dependent attributes to a table keyed by that part |
| 3NF | 2NF, and no non-key attribute depends on another non-key attribute | Move them to a table keyed by the attribute they depend on |
Memory line: every non-key attribute depends on the key, the whole key and nothing but the key.
A table with a single-attribute primary key that is in 1NF is automatically in 2NF.
Normalising: the routine
- List all attributes; spot the repeating group.
- 1NF: one row per occurrence; pick a key (often composite).
- 2NF: for each non-key attribute, ask “does it depend on the whole key?” If not, move it.
- 3NF: ask “does it depend on another non-key attribute?” If so, move it.
- Write each table as NAME(Key, …), mark the primary key, list the foreign keys.
Indexing: quick facts
- Speeds up searching and sorting on the indexed field.
- Costs extra storage, and slows inserts, updates and deletes because the index must be kept up to date.
- Primary keys are normally indexed; secondary keys are indexed when often searched.
Exam traps
- A foreign key is the primary key of another table, not “any key from another table”.
- Only one candidate key becomes the primary key.
- 2NF problems need a composite key.
- Name the attributes in a dependency: “CustomerName depends on CustomerID, a non-key attribute”.
- When asked how relational databases address limitations, give the fix, not another description of the problem.
- Do not leave M:M relationships in a final design.
Self-test
- Define data redundancy and explain how it leads to inconsistency.
- What is meant by data dependence in a file-based system?
- Distinguish a candidate key from a secondary key.
- Define foreign key.
- A DBMS refuses to delete a customer who still has orders. Which concept is this?
- Give one benefit and one cost of indexing a field.
- Customers and products have a M:M relationship through orders. How is it resolved?
- In a 1:M relationship between DEPARTMENT and EMPLOYEE, where is the foreign key?
- State the condition for a table to be in 2NF.
- Why can a table with a single-attribute primary key not fail 2NF (if in 1NF)?
- EMPLOYEE(EmpID, Name, DeptID, DeptName). Is it in 3NF? Explain.
- Give the 3NF tables for question 11.
Answers
- The same data stored more than once; if one copy is updated and another is not, the copies disagree.
- Programs are written around the structure of the files, so changing a file’s structure means changing the programs.
- A candidate key is any attribute (set) that could uniquely identify records; a secondary key is a candidate key that was not chosen as primary key.
- An attribute in one table that is the primary key of another table, used to link them.
- Referential integrity.
- Benefit: faster searching/sorting on that field. Cost: extra storage / slower updates.
- A link table such as ORDERLINE holding both CustomerID/OrderID and ProductID, giving two 1:M relationships.
- In EMPLOYEE (the “many” end), as DeptID.
- It is in 1NF and every non-key attribute depends on the whole primary key (no partial dependencies).
- A partial dependency needs a key with more than one attribute to depend on part of.
- No: DeptName depends on DeptID, a non-key attribute (non-key dependency).
- EMPLOYEE(EmpID, Name, DeptID) and DEPARTMENT(DeptID, DeptName); DeptID is a foreign key in EMPLOYEE.
Related resources
-
Study guides
Cambridge A Level Computer Science (9618): Database Management Systems (DBMS)
Data dictionary, logical schema, integrity, access rights, backups, developer interface and query processor for Cambridge AS Computer Science 9618 8.2.
Computer Science · Cambridge · AS Level
Read guide -
Revision notes
Cambridge A Level Computer Science (9618): Database Management Systems (DBMS) – Revision Notes
Condensed notes on DBMS features, data dictionary, schema, access rights, backups and DBMS tools for Cambridge AS Computer Science 9618 8.2.
Computer Science · Cambridge · AS Level
Revise topic -
Study guides
Cambridge A Level Computer Science (9618): Data Definition Language (DDL) and Data Manipulation Language (DML)
SQL DDL and DML for Cambridge AS Computer Science 9618 8.3: CREATE, ALTER, keys, SELECT with joins and aggregates, INSERT, UPDATE and DELETE.
Computer Science · Cambridge · AS Level
Read guide
Get free revision emails (optional)
Occasional emails with practice questions, worked explanations and links to free resources for the qualification and subjects you choose. No spam, and you can unsubscribe from any email. The free tools on this site never need an email.