Single Table Databases
- A database is a structured collection of data so it can be searched, sorted, filtered and analysed quickly
- Data in a database can be any type of data including text, images, videos, sound
- Databases use tables to store data
- Tables have records of data represented by one row
- In the example below, each row represents the data stored about a single customer (the customer’s record)
- In the customer table there are 3 records
- Each record is divided into fields (CustomerID, FirstName, LastName, DOB and Phone Number)
A Database Table Containing Customer Details
|
|
|
|
PhoneNumber |
1 |
Andrea |
Bycroft |
05031976 |
0746762883 |
2 |
Melissa |
Langler |
22012001 |
0756372892 |
3 |
Amy |
George |
22111988 |
0746372821 |
- Fields are represented by the columns in a table
- There are 5 fields in the customer table
- The first row in a table contains the field names which is the heading for the data stored in that field
- Each field in a table has a data type which defines what data can be entered into that field
Worked example
A Database Table Containing Pet Details
|
|
|
|
|
DG12 |
Smokey |
Poodle |
12 |
M |
DG34 |
Harvey |
Springer Spaniel |
10 |
M |
DG48 |
Maisie |
Labradoodle |
3 |
F |
DG49 |
Maggie |
Labradoodle |
3 |
F |
DG88 |
Winston |
Bulldog |
7 |
M |
DG95 |
Shona |
Golden Retriever |
6 |
F |
How many fields are there in the Dogs table shown above?
[1]
5 [1]
How many records are there in the Dogs table?
[1]
6 [1]
Exam Tip
- It is very likely you will be presented with an example database table and identify either how many fields there are or how many records there are so make sure you remember a record is row and a field is a column