[DOCS-3393] Modeling Monetary Data in MongoDB Created: 12/May/14 Updated: 16/Mar/15 Resolved: 01/Jul/14 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | v1.3.7 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Tim Slavin | Assignee: | Tim Slavin |
| Resolution: | Done | Votes: | 0 |
| Labels: | sprint-rollover | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: | |
| Days since reply: | 9 years, 31 weeks, 2 days ago |
| Description |
|
The following is something I sent to a user, and resembles something If you feel like documenting this, maybe also see this: http://www.moschetti.org/rants/mongomoney.html – – (A) Many fractional numeric quantities that come up frequently in (B) Many applications that want to handle monetary data are required MongoDB has no built-in support for storing numeric data except as MongoDB has no built-in support for decimal arithmetic, either exact So how you handle monetary data in MongoDB depends on the Broadly speaking, there are two options: (1) If you know in advance what the maximum precision for monetary This approach allows the application to employ all numerical and However, note that every part of the application needs to be (2) If you need arbitrary or unanticipated precision in your monetary This way, an application that needs to retrieve or sort data according In general this approach is somewhat more restrictive than the |
| Comments |
| Comment by Githook User [ 14/Jul/14 ] |
|
Author: {u'username': u'TimSlavinMongoDB', u'name': u'Tim Slavin (MongoDB)', u'email': u'tim.slavin@10gen.com'}Message: Signed-off-by: kay <kay.kim@10gen.com> |
| Comment by Githook User [ 09/Jul/14 ] |
|
Author: {u'username': u'TimSlavinMongoDB', u'name': u'Tim Slavin (MongoDB)', u'email': u'tim.slavin@10gen.com'}Message: Signed-off-by: kay <kay.kim@10gen.com> |
| Comment by Sam Kleinman (Inactive) [ 01/Jul/14 ] |
|
merge still pending |