A supermarket stores stock information in a database table called INVENTORY. ItemID ItemName Category Quantity UnitPrice ExpiryDate G01 Whole Milk Dairy 45 ...

Assessment: Computer Science 0478 | Paper 2 Mock 01 | Algorithms, Programming and Logic Subject: Computer Science - 0478

Question 1 Report

A supermarket stores stock information in a database table called INVENTORY.

ItemIDItemNameCategoryQuantityUnitPriceExpiryDate
G01Whole MilkDairy451.202024-04-10
G02White BreadBakery121.502024-04-05
G03Cheddar CheeseDairy302.802024-04-20
G04Sourdough LoafBakery82.502024-04-04
G05Greek YoghurtDairy600.902024-04-15
G06Croissant PackBakery253.002024-04-06
G07Orange JuiceDrinks401.802024-04-25

(a) State the data type of the Quantity field. [1]

Answer Details

(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.

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning