CodeIEB
Theory Notes/๐Ÿ—„๏ธ Topic 4: Data & Information Management, Solution Development/10.4.10
10.4.10Grade 10

Relational Database Concepts

Before writing any SQL, you need the core vocabulary of how a relational database is structured.

Field
A single piece of data/attribute in a database, represented as a column in a table (e.g. Surname).
Record
A complete set of related field values, represented as a single row in a table (e.g. one specific person's full details).
Table
A structured collection of related records, made up of rows (records) and columns (fields).
Primary key
A field (or combination of fields) that uniquely identifies each record in a table โ€” no two records may share the same primary key value, and it cannot be left empty.

Database schema/structure vs data โ€” the schema is the design/blueprint of the database (table names, field names, field types, keys), while the data is the actual content stored within that structure. You can have an empty database with a defined schema but no data yet.

Example

Table: Learners Schema: LearnerID (primary key, autonumber), Name (text), Grade (integer) Data/records: 1, 'Thabo', 11 2, 'Aisha', 10

๐Ÿ’ก Exam Tip

Don't confuse 'field' and 'record' โ€” a field is a column (one type of data across all rows), a record is a row (one complete entry).