A table holds all the data about one kind of thing. A record is one row: everything about a single item. A field is one column: one kind of fact, such as a name or a price.
These words open nearly every question in databases and query reasoning, so being exact with them saves marks later.
How do the three parts fit together?
Think of a school register on paper. The whole sheet is the table.
Each line for one student is a record. Each heading, such as “class” or “date”, is a field.
Here is the fictional Plants table used throughout this module.
| PlantID | Name | Type | Price | Stock | Indoor |
|---|---|---|---|---|---|
| P01 | Fern | Foliage | 12.50 | 8 | TRUE |
| P02 | Cactus | Succulent | 6.00 | 25 | TRUE |
| P03 | Rose | Flowering | 15.00 | 0 | FALSE |
| P04 | Mint | Herb | 4.50 | 40 | FALSE |
| P05 | Orchid | Flowering | 28.00 | 3 | TRUE |
Each field also has a data type: it decides what values the column may hold.
PlantID, Name and Type are text.
Price is real (decimals allowed). Stock is integer. Indoor is Boolean (TRUE or FALSE).
Worked example
Using the five rows above, answer these.
Step 1, count the fields. Read the header row: PlantID, Name, Type, Price, Stock, Indoor. That is 6 fields.
Step 2, count the records. Count the data rows, not the header: P01 to P05. That is 5 records.
Step 3, name one whole record. The Orchid record is P05, Orchid, Flowering, 28.00, 3, TRUE.
Step 4, name the data type of Stock. The values 8, 25, 0, 40, 3 are whole numbers, so Stock is integer.
Step 5, name the table. The table is Plants.
Final answer: 1 table, 6 fields, 5 records. Always state the header row separately, because it is not a record.
The mistake to watch for
A common slip is to say “the Price record” when the question means the Price field.
Mistaken answer: “Price is a record with values 12.50, 6.00, 15.00.”
The student described a column, which is a field, and used the word for a row.
The correction: a field runs down a column, a record runs across a row. A quick test is to ask “is this one item (record) or one kind of fact (field)?”
Check yourself
1. In the table above, how many fields would there be if a Colour column were added, and how many records?
Show answer
Fields: 6 + 1 = 7. Records stay at 5, because adding a column does not add a row.
2. Which data type suits the field Indoor, and why?
Show answer
Boolean, because every value is one of two states, TRUE or FALSE.
3. Is “Mint, Herb, 4.50” a field, a record or a table?
Show answer
It is part of a record (the P04 row), but not the whole record, as the other values are missing. Fields are the columns, such as Type.
Where this leads next
Next, see how to choose a suitable key so every record can be told apart. Then check yourself with the module practice set, and explore the read-only SQL practice lab if you want to see real tables.
If these terms still blur together when exam wording gets tricky, our teachers can help through online one-to-one Computer Science tuition.