DS0-001 · Question #127
Which of the following is used to store product quantities on a table while ensuring the minimal amount of storage is consumed?
The correct answer is B. INTEGER. INTEGER is the correct choice because product quantities are whole numbers (you can't have 2.5 units of a product), and INTEGER stores only whole number values using a fixed, compact byte size - making it both semantically accurate and storage-efficient. DOUBLE and FLOAT are…
Question
Which of the following is used to store product quantities on a table while ensuring the minimal amount of storage is consumed?
Options
- ADOUBLE
- BINTEGER
- CCOUNT
- DFLOAT
How the community answered
(35 responses)- A3% (1)
- B77% (27)
- C14% (5)
- D6% (2)
Explanation
INTEGER is the correct choice because product quantities are whole numbers (you can't have 2.5 units of a product), and INTEGER stores only whole number values using a fixed, compact byte size - making it both semantically accurate and storage-efficient.
DOUBLE and FLOAT are wrong because they store floating-point (decimal) numbers, which waste storage on precision you don't need for quantities, and can introduce rounding errors. COUNT is not a storage data type at all - it's an aggregate SQL function used to tally rows in a query result.
Memory tip: Think "quantities are always whole, so use a whole number type." Among whole-number types, INTEGER is the standard go-to; if you needed an even smaller footprint for tiny quantities, you'd consider TINYINT or SMALLINT, but INTEGER is the best fit among the given options.
Topics
Community Discussion
No community discussion yet for this question.