A record is a data structure that groups together several related data items, each of which may have a different data type. A record is made up of fields.
| Field name | Data type | Example value |
|---|---|---|
| studentID | Integer | 10023 |
| firstName | String | "Aisha" |
| lastName | String | "Khan" |
| dateOfBirth | String | "2009-05-14" |
| isPremium | Boolean | True |
| grade | Real | 87.5 |
| Feature | Array | Record |
|---|---|---|
| Data types | All same type | Can be different types |
| Access by | Index (number) | Field name |
| Use case | List of same items | Single entity with attributes |
| Example | scores[0..9] | student.firstName |
In a database, records are stored as rows in a table. Multiple records form a table:
| studentID | firstName | grade | isPremium |
|---|---|---|---|
| 10023 | Aisha | 87.5 | True |
| 10024 | James | 72.0 | False |
| 10025 | Priya | 91.0 | True |
Each row = one record; each column = one field.
To access a field in a record, use dot notation:
student.firstName → accesses the firstName fieldstudent.grade ← 92.0 → updates the grade fieldIn Edexcel pseudocode/Python, records can be represented using a dictionary or class.
8 Edexcel-style questions · instantly marked
| Term | Definition |
|---|
Timed exam-style test.