Database Concepts
Learning Objectives
Define a single-table database Suggest suitable basic datatypes Understand the purpose of a primary key
What is a single-table database?
Definition A single-table database stores all related data in one table. The table is made up of fields (columns) and records (rows). Each record represents one item or person. Each field stores one type of data.
Example
Student Table
Fields, Records and Validation
Fields
A field is a column in a table It has:
- A name (e.g. DateOfBirth)
- A data type (e.g. TEXT, INTEGER, DATE)
Example fields: StudentID, Name, Email, YearGroup
Records
A record is a row in the table
It contains all the data about one item Example:
One row = one student
Validation
Validation rules are used to check data is sensible before it is saved They reduce errors, but do not guarantee data is correct Examples of validation:
- Range check → YearGroup must be 7–11
- Presence check → Name cannot be left blank
- Format check → Email must contain @
- Length Check --> Name bust be less than a set number of characters
Watch
Play
Data Types
Text/Alphanumeric: For words, names, or codes (e.g., "John", "A123").
Character: Single letters or symbols (e.g., 'M', 'F').
Boolean: True/False or Yes/No values.
Integer: Whole numbers (e.g., 10, 456).
Real: Decimal numbers (e.g., 3.14, 99.99).
Date/Time: Dates and time values (e.g., 21/11/2024, 14:30).
The Primary Key
Purpose of a Primary Key:
- Ensures uniqueness: Each record in the table can be uniquely identified.
- Prevents duplication of data.
- Acts as a reference for relationships between tables in a relational database.
Identifying a Suitable Primary Key:
Must be unique for every record in the table.
Examples:
For a student table: StudentID.
For an employee table: EmployeeID.
For a product table: ProductCode.
Database Concepts
Kirsty Clark
Created on January 5, 2026
Start designing with a free template
Discover more than 1500 professional designs like these:
View
SWOT Challenge: Classify Key Factors
View
Vision Board
View
Explainer Video: Keys to Effective Communication
View
Explainer Video: AI for Companies
View
Corporate CV
View
Flow Presentation
View
Discover Your AI Assistant
Explore all templates
Transcript
Database Concepts
Learning Objectives
Define a single-table database Suggest suitable basic datatypes Understand the purpose of a primary key
What is a single-table database?
Definition A single-table database stores all related data in one table. The table is made up of fields (columns) and records (rows). Each record represents one item or person. Each field stores one type of data.
Example
Student Table
Fields, Records and Validation
Fields
A field is a column in a table It has:
- A data type (e.g. TEXT, INTEGER, DATE)
Example fields: StudentID, Name, Email, YearGroupRecords
A record is a row in the table It contains all the data about one item Example: One row = one student
Validation
Validation rules are used to check data is sensible before it is saved They reduce errors, but do not guarantee data is correct Examples of validation:
Watch
Play
Data Types
Text/Alphanumeric: For words, names, or codes (e.g., "John", "A123"). Character: Single letters or symbols (e.g., 'M', 'F'). Boolean: True/False or Yes/No values. Integer: Whole numbers (e.g., 10, 456). Real: Decimal numbers (e.g., 3.14, 99.99). Date/Time: Dates and time values (e.g., 21/11/2024, 14:30).
The Primary Key
Purpose of a Primary Key:
- Ensures uniqueness: Each record in the table can be uniquely identified.
- Prevents duplication of data.
- Acts as a reference for relationships between tables in a relational database.
Identifying a Suitable Primary Key: Must be unique for every record in the table. Examples: For a student table: StudentID. For an employee table: EmployeeID. For a product table: ProductCode.