Main
Menu
SPIRIT in ICT
Departmental Expectations
Year 7
Year 8
Year 9
Year 10
Year 11 |
Database Data Types
You will need to explain to the examiner that you fully understand
when to use the following data types:-
Autonumber |
An auto number field increments (adds one) to itself every
time a new record is added to the table. It is the ideal field
type for a primary key because it never repeats itself, and is
therefore unique. |
Text |
A text field can contain any character, including letters,
numbers and punctuation. Certain fields, such as telephone numbers
can contain spaces, the “+” sign, and brackets, as
well as a place name, for e.g. “Wakefield 303065”.
This would be an obvious time to use a text field rather than
a number. |
Number |
Number fields provide an efficient way of storing data that
can be expressed in a numerical way, such as how large something
is, e.g. length or weight. Number fields can be formatted as:-
- Integers (do not contain a decimal part)
- Currency (contain a currency symbol i.e. £, and two
decimal places)
- Decimal (contain a whole number and a decimal part)
|
Currency |
This is NOT a field type, but is a method of formatting
a number data type (see above) |
Yes/No |
You can often store data as one of two choices, and the “yes/no”
data type is the most efficient way of storing this kind of information.
The yes/no data type does not necessarily have to store yes or
no, it can also be used for:-
- True and false (i.e. “Does it have WAP?”)
- Zero and one (binary data type)
- Male or Female
|
|
|