5f Data Types Flashcards

0
Q

The telephone number field in the CUSTOMER entity has the data type text.
Explain why text has been chosen as the data type for the telephone number. (2)

A

So that the leading 0 can be stored (1) and the number stored correctly (1)
So that spaces/brackets can be stored (1) so that the dialling code can be differentiated from the number (1)
So that textual telephone numbers can be stored (1) e.g. 0800 REVERSE (1)
There is no need for mathematical calculations to be performed (1) so a
numerical field is not required (1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

Explain why the integer data type is not appropriate for storing a telephone number. (2)

A

Will not accept leading 0 (1)
Some telephone numbers stored as text – 0800 BOOKTOUR (1)
Will not accept space (1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
(c) The hospital stores patient records.
Give the most suitable data type for each of the fields shown in the table below and state why you have chosen that data type. (6)
Telephone No
Gender
Number of previous operations
A

Telephone number: Text/alphanumeric/string (1) starts with a zero/can contain letters/has spaces (1)
Gender: Boolean/True False/YN (1) one of two choices (1) Number of previous operations: integer (1) can only have whole numbers of operations (1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

State the most appropriate data type for the following fields in the tour database. (2)
Number in Party
Paid?.

A

Number in Party: Integer (1)

 Paid? Boolean or Yes/No or Y/N or True/False or T/F (1).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Give two advantages of using the autonumber data type for the TourID.

A

Automatically entered (1)
 Will be unique (1)
 Allows consistent format (1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly