Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
A delivery company has a table Customers with the fields CustomerID, FullName and Address. A typical record is:
C12, Nadia Rahman, 14 Mill Lane, Northfield, NF3 8KD
The company wants to sort its customers by surname and to find every customer in one town. Suggest a better set of fields. How many fields does the new design have if the address is split into house number and street, town and postcode?
A single-table database keeps all its data in one table. A record is one row: all the data about one thing. A field is one column: one item of data about every thing, and its heading is the field name. A table with records and fields holds data items.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Step 1. Find the problem. FullName holds two items, the first name and the surname, so the table cannot be sorted by surname. Address holds three items, so the table cannot be searched by town.
Step 2. Split them. FullName becomes FirstName and Surname. Address becomes Street (the house number and the street), Town and Postcode.
Step 3. Count. CustomerID, FirstName, Surname, Street, Town and Postcode: fields.
Watch out. The data is the same. Only the design changes, so that each field holds one item.
Answer: fields: CustomerID, FirstName, Surname, Street, Town, Postcode.
Log in to join the discussion.
Loading…