A finance team is configuring a budgeting application that must store expense amounts such as 1250.75 and run monthly roll-ups without losing even a single cent to binary-rounding issues. Which data type should the database administrator choose so the stored values remain exact?
A currency (money) data type is implemented as a fixed-precision decimal, so every cent is preserved in calculations. Floating-point numbers can introduce tiny binary-rounding errors, integers cannot hold fractional cents unless awkward scaling is applied, and plain-text fields provide no numeric validation or arithmetic.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is a monetary data type preferred over a float for financial calculations?
Open an interactive chat with Bash
What is a rounding error, and why does it happen with floats?
Open an interactive chat with Bash
Can you explain the difference between monetary and integer data types?