Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7073883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:59:00+00:00 2026-05-28T05:59:00+00:00

I am evaluating MongoDB as a storage solution for our financial/accounting RESTful API. I

  • 0

I am evaluating MongoDB as a storage solution for our financial/accounting RESTful API. I know about MongoDB’s lack of transactions and decimal data type, however:

I suppose I could overcome the lack of decimals by storing them as integers, and dividing/multiplying them by the precision factor as needed. Consumers are gonna load (GET) and save (PUT/POST) via the API layer, allowing me to take care of the conversion at the API level. Storing integers would allow for computations and atomic updates as needed.

I don’t see MongoDB’s lack of transactions as a show stopper either, at least not in my case: a REST API would not allow for huge, one-call-fits-them-all multi updates. It would be consumer’s resposanbility to implement a rollback logic in case of a failure during a ‘logical’ transaction (a chain of multiple subsequent update calls).

The ‘objects’ stored in the DB would be invoices, inventories, payments… the standard accounting stuff. While the relational data model has proven to be a good solution for storing this kind of data, I don’t see how a schemaless storage would cause trouble. Take the invoice item. I could store each document in a Documents collection, with nested line items. Of course I would still need several collections: Documents, Payments, Contacts and so on, which is why MongoDB’s use of collections looks like a good match to me.

Has anybody done something even remotely similar before? I am still at the design stage so I’d really use some feedback from the MongoDB/REST veterans out there – thanks.

PS: in case you’re wondering, I’d be perfectly fine with a RDBMS solution, but I like to consider alternatives and I see some advantages going the schemaless way. For one, MongoDB outputs JSON/BSON which is what a REST API works with. Second, schemaless means that I can receive a document with a variable number of fields and store it right away, without worrying much about the missing fields (which will be nulls on the DB and will need lots of if IsNULL(fieldname) when building a response to a GET request), etc.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:59:01+00:00Added an answer on May 28, 2026 at 5:59 am

    Storing decimals as integers is something that people are doing. If you go through the decimal-support feature request in MongoDB’s jira, you’ll see a couple mention that that’s their workaround:
    https://jira.mongodb.org/browse/SERVER-1393

    Note that the factor will compound when you do map reduce and stuff which multiplies/divides two or more such numbers.

    As for the lack of transactions, it does sound like it won’t be a problem for you today, but what about tomorrow? If your API will always deal with small units of work, then sure. 2-stage commits are always possible too.

    I think it’s great to learn new technologies…not going to suggest you don’t. But consider that schemaless really shines when you need to query on those fields. If you don’t, then you could just store them all in a single blobbed-up field/column in either a document or a relational database. (although, every time I’ve seen a project do this, they 3 months down the road they need to start querying/reporting/something on one of those serialized values, and that’s a real pain).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While evaluating the advantages and disadvantages of moving our Subversion-based repository over to Git,
Evaluating Tinymce. I've looked at the docs/source/api, and have a question that I thought
I am evaluating the technology our company will be using for Android and iOS
I am evaluating an algorithm, and would like to use artificial data. The algorithm
Currently evaluating Dreamweaver CS 5.5. I like much of it - but wondering about
My development team is evaluating the various frameworks available for .NET to simplify our
Evaluating a third party data processing tool, I have bumped into a case where
I'm evaluating the use of CRM 2011 to replace one of our existing LOB
Evaluating Berkeley DB with Java APIs. Following is one of my test XML data:
I'm evaluating MongoDB, coming from Membased/memcached because I want more flexibility. Of course Membase

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.