Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is nosql Database good for Online Money Transaction management

Tags:

nosql

I am planning to use nosql Database as the back-end for my Web Product. I have a few very basic doubts.

1) I have read in a blog that Nosql database are not so good for Online Money Transaction i.e. where data integrity is highest importance.(My product has Online money transactions)

2) There will be around daily minimum 1000 users.

3)Will availability be a problem ?

Can you please state any more pros and cons related to Nosql database.I am planning to use MongoDb. Can this satisfy my above queries.

Is my question clear or do i need to give more info? Please comment and i will make the necessary changes.

like image 471
Akamad007 Avatar asked Sep 13 '11 09:09

Akamad007


People also ask

Is NoSQL good for transactions?

Despite the differences in the design of different NoSQL databases, they all have simple data model and do not support transactions. They lack support for complex queries such as joins across tables.

Which database is best for financial transactions?

If you had no concerns about storage costs (managed MongoDB Atlas is a bit pricey), MongoDB is a clear winner for storing end-of-day OHLC data. It has the fastest reads and very good writes and multi-record appends.

Do banks use NoSQL databases?

While there are many popular NoSQL databases on the market today, most major banks shy away from using these databases in production environments for handling mission-critical data.

Is NoSQL good for OLTP?

Relational databases are designed for transactional and strongly consistent online transaction processing (OLTP) applications and are good for online analytical processing (OLAP). NoSQL databases are designed for a number of data access patterns that include low-latency applications.


2 Answers

NoSQL databases are there to solve several things, mainly:

  • (buzz) BigData => think TB, PB, etc..

  • Working with Distributed Systems / datasets => say you have 42 products, so 13 of them will live in Chicago datacenter, 21 in NY's and another and 8 somewhere in Japan, but once you query against all 42 products, you would not need to know where they are located: NoSQL DB will. This also allows to engage a lot more brain power ( servers ) to solve hard computational problems [ does not seem it would fit your use case, but it is an interesting thing to note ]

  • Partitioning => having your DB be easily distributed, besides those cool 8 products in Japan, also allows for an easy data replication, so those 42 products will be replicated with a factor of 3, for example, which would mean you DB would have 3 copies for every product. Hence if something goes down, no problem => here is a replica available. This is where NoSQL databases actually shine vs. RDBMS. Granted you can shard, partition and cluster Oracle / MySQL / PostgreSQL / etc.. BUT it is a several magnitudes more complicated process and usually a maintenance headache for most people you'd employ.

(to your questions)

  • There will be around daily minimum 1000 users

    1000 users daily is an extremely low volume, unless you choose a NoSQL solution that was written yesterday at 3 a.m. as a proof concept, there should be no worries here. But if you are successful, and will have 100,000,000 users in a couple of months, NoSQL would be simpler to scale.

  • Will availability be a problem ?

    Solid NoSQL solutions allow you to specify something that is called a quorum: "The quantity of replicas that must respond to a read or write request before it is considered successful". Some solutions also do something called a hinted handoff: "neighboring nodes temporarily take over storage operations for the failed node". In general, you should be able to control availability depending on your requirements.

(from your comments)

  • We are planning to expand. And dont want the database to be a constraint

Expanding is a very relative term. "Financial industry is pretty expanded", and they still mostly use RDBMS for day to day operations. Facebook uses MySQL. Major banks, I did work for, use Oracle / MySQL / PostgreSQL / DB2 / etc.. and only some of them do use NoSQL, but NOT for data that requires 100% consistency all the time. Even Facebook uses Cassandra only for things like "inbox search". But if by expand you mean more data and more users ( requests, connections, etc.. ), NoSQL will be a lot easier to scale. Again, it does not mean that you can't scale RDBMS, it is just more tedious/complicated.

  • From what I have read, in no SQL database we dont have to think about the schema a lot

In my experience, if I build a system that is any good, I ALWAYS have to think about the schema. NoSQL databases allow you to be a bit more flexible with the data you persist, but it does not mean you should think about the schema any less. Think of indexing the data for example, or sharding it over multiple clusters, or even contracts/interfaces that you may expose to clients, etc..

  • The maintenance required for NoSQL database is very less

I would not say this is true in general, unless we are talking about BigData. Take PostgreSQL for example. It is an extremely awesome piece of software, that is quite easy to work with and maintain. Another plus to RDBMS world => people feel A LOT more comfortable with SQL. For that reason, for example, Cassandra guys, released CQL in 0.8, which is a very limited subset of SQL. Terms like maintenance also should stand shoulder to shoulder with terms like Talent, Knowledge, Expertise. Since if you use Cassandra, for instance, that girl is a very "high maintenance", but not for guys from DataStax who do have Expertise, but you'd have to pay for that.

Your Main Question

  • I have read in a blog that NoSQL database are not so good for Online Money Transaction i.e. where data integrity is highest importance.( My product has Online money transactions )

Without truly knowing what your product is, it is hard to say whether a NoSQL database would / would not be a good fit. If the primary goal of the product is "Online Money Transaction", then I would suggest against NoSQL database ( at least today in the year of 2011 ). If "Online Money Transaction" is just one of the requirements, but not "the core" of your product, depending on what "the core" is, you can definitely give NoSQL database a try, and for example use an external service to process (e.g. Google Checkout, etc..) your transactions with a guaranteed consistency.

As a technical note, if the problem you are trying to solve benefits from being solved with distribution, I would recommend databases that are written in Erlang ( e.g. Riak, CouchDB, etc. ), since Erlang as a language already solves successfully most of distributed things for decades.

like image 62
tolitius Avatar answered Jan 05 '23 01:01

tolitius


MarkLogic is a NoSQL database with ACID transactions that gets used to manage both virtual currency in games as well as real-life banking trades.

like image 40
Eric Bloch Avatar answered Jan 04 '23 23:01

Eric Bloch