I heard from a speaker at a Hackaton event organized by a bank that you should not use nosql for financial transaction for security reasons. But I have no idea what he's saying. I have been looking for an answer as to why I should not use nosql database in my application.
What are the pros and cons of nosql, and what are the pros and cons about sql databases for financial transaction?
Now, I'm building an application for shop cashier, where the cashier will use this app to store transactions, receive orders, and receive payments with Cash or Credit Card.
What is the best possible approach for this project's API? SQL or NoSQL, and why?
They lack support for complex queries such as joins across tables. While relational databases rely heavily on normalization and referential integrity, NoSQL databases are not strictly normalized. Generally, NoSQL databases do not implement multi-key transactions.
NoSql DBs are for unstructured or semi-structured data which obviously do not support transactions. There is one major drawback of NoSQL is lacking data consistency. Data should be consistent while making payments and should follow db transactions for data reliability. This is possible only within the RDBMS.
Generally speaking, NoSQL solutions have lighter weight transactional semantics than relational databases, but still have facilities for atomic operations at some level. Generally, the ones which do master-master replication provide less in the way of consistency, and more availability.
What are the drawbacks of NoSQL databases? One of the most frequently cited drawbacks of NoSQL databases is that they don't support ACID (atomicity, consistency, isolation, durability) transactions across multiple documents. With appropriate schema design, single-record atomicity is acceptable for lots of applications.
AS explained by @A2H, the SQL and NoSQL depends on your requirements, saying that NoSQL is not secure is not accurate, this is like saying that SQL is not scalable... which is not true either.
Now, for a financial application you will have some non-functional requirements that I can list below:
the list will continue... but I think you get the idea...
Saying that NoSQL is un-secure is an overstatement, as any other generalisation.
SQL and NoSQL databases are not interchangeable. There's no silver bullet database technology. You should consider pros and cons when choosing what database technology you want to use for your project.
Short answer: If you need to process transactions, your data can nicely be arranged in relational entities then use SQL. If you need to handle large volumes of semi-structured or unstructured data, and need horizontal scalability, then use NoSQL.
If you want to read more about differences between SQL and NoSQL click here or here.
Some insight on when to use SQL or NoSQL can be found here.
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