Spanish traders set the standard forGnuCash database design
4 hours ago
- #GnuCash Database Design
- #Fractional Money Storage
- #Historical Trade Systems
- GnuCash's database design stores currency and commodity amounts as fractions, influenced by the 1600s Spanish trading system that used fractions based on counting with fingers excluding thumbs.
- This design accommodates commodities like Bitcoin with 100 million minor units (Satoshis) and historical currencies divided into fractions (e.g., 1/8 of a dollar), allowing flexibility in changing precision without recalculating balances.
- Using fractions avoids floating-point rounding errors common in software when handling money, but it introduces performance drawbacks like slow addition/subtraction due to least common denominator calculations, making it unsuitable for modern high-scale systems.
- HandsOnMoney uses a simpler minor unit storage approach (e.g., storing 523 cents for $5.23), which lacks support for fractional commodities or on-the-fly precision changes but is more efficient and practical for most users.
- GnuCash's fractional storage, while an artifact from a time when stock exchanges used fractional quotes, remains effective for handling diverse commodities and historical data, though it may display confusing fractional values in modern use, as seen in a bug report.