I can't find a sample of currency data type in the object definition, nor a document on the subject.
The 4 different types of money as classified by the economists are commercial money, fiduciary money, fiat money, commodity money. Money whose value comes from a commodity of which it is made is known as commodity money.
Unlike the DECIMAL data type, the MONEY data type is always treated as a fixed-point decimal number. The database server defines the data type MONEY(p) as DECIMAL(p,2). If the precision and scale are not specified, the database server defines a MONEY column as DECIMAL(16,2).
Economists differentiate among three different types of money: commodity money, fiat money, and bank money.
1 Answer. Java has Currency class that represents the ISO 4217 currency codes. BigDecimal is the best type for representing currency decimal values.
There is no built-in "currency" type. You would typically use type: number
with an optional format
modifier to indicate the meaning of the numeric type:
type: number
format: currency
format
can have arbitrary values, so you can use format: currency
or format: decimal
or whatever your tool supports. Tools that recognize the given format
will map the value to the corresponding type.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With