Question 1 Report
A car rental company uses a database to manage its fleet of vehicles.
(a) The table shows part of the database. Suggest an appropriate data type for each field. [3]
| Field | Example | Data type |
|---|---|---|
| Registration number | AB12 CDE | |
| Daily hire rate | 45.00 | |
| Available for hire | True |
(b) Describe two validation checks that could be applied to the Daily hire rate field. [2]
(c) State the purpose of using an input mask on the Registration number field. [1]
(a) Appropriate data types for each field:
| Field | Example | Data type |
|---|---|---|
| Registration number | AB12 CDE | Text/String [1] - because it contains a mixture of letters, digits, and a space, it cannot be treated as a number. |
| Daily hire rate | 45.00 | Currency/Real [1] - because it represents a monetary value with decimal places. |
| Available for hire | True | Boolean [1] - because it can only be one of two values: True or False. |
(b) Two validation checks for the Daily hire rate field:
(c) An input mask forces the user to enter data in a specific predefined format, such as two letters followed by two digits, a space, and three letters (LL99 LLL). [1] This reduces data entry errors by preventing incorrectly formatted registration numbers from being accepted.
Everything you need to excel in your exams