You need to store product quantities, and you want to minimize the amount of storage space that is used. Which data type should you use?
You need to store product quantities, and you want to minimize the amount of storage space that is used. Which data type should you use?
When storing product quantities, the best data type to use is INTEGER. This is because quantities are whole numbers and do not require decimal points. Using an INTEGER will minimize the amount of storage space, as it typically occupies 4 bytes. In contrast, data types like FLOAT and DOUBLE, which store decimal numbers, usually consume more space. COUNT is not a standard data type in most programming languages or databases.
It should not be float, float has a potential to be 4+ bytes where an INT is 4 bytes, only float has the potential to be greater then INT in byte size. INT can only be Less than or Equal to Float in terms of byte size. Therefore INT is smaller.
i think it should be float
A float uses more data, and stores numbers after the ".". Those will never be used in quantities, since you can't have 1.5 products in most cases. I agree with the other person that it should be an integer
A) INTEGER