Question 1 Report
A supermarket stores stock information in a database table called INVENTORY.
| ItemID | ItemName | Category | Quantity | UnitPrice | ExpiryDate |
|---|---|---|---|---|---|
| G01 | Whole Milk | Dairy | 45 | 1.20 | 2024-04-10 |
| G02 | White Bread | Bakery | 12 | 1.50 | 2024-04-05 |
| G03 | Cheddar Cheese | Dairy | 30 | 2.80 | 2024-04-20 |
| G04 | Sourdough Loaf | Bakery | 8 | 2.50 | 2024-04-04 |
| G05 | Greek Yoghurt | Dairy | 60 | 0.90 | 2024-04-15 |
| G06 | Croissant Pack | Bakery | 25 | 3.00 | 2024-04-06 |
| G07 | Orange Juice | Drinks | 40 | 1.80 | 2024-04-25 |
(a) State the data type of the Quantity field. [1]
(a) The data type of the Quantity field is INTEGER. [1]
Quantity stores whole number values representing the count of items in stock (e.g. 500, 80, 250). It does not need decimal places, so INTEGER is more appropriate than REAL. Using INTEGER also prevents invalid fractional quantities like 45.7 items.
Everything you need to excel in your exams