为什么不应该使用nosql进行金融交易

时间:2021-01-19 12:34:09

I heard from a speaker on an Hackaton event that organized by a bank, that you should not use nosql for financial transaction, because of its security reason. But I have no idea about what he's saying. I have been looking for an answer why I should not use nosql database in my application.

我从发言人那里听到一个由银行组织的Hackaton事件,由于其安全原因,你不应该使用nosql进行金融交易。但我不知道他在说什么。我一直在寻找一个答案,为什么我不应该在我的应用程序中使用nosql数据库。

What's the pro and con about nosql, and what's the pro and con about sql database for financial transaction?

什么是关于nosql的pro和con,以及关于sql数据库的金融交易的专业和缺点是什么?

Now, I'm building an application for shop cashier, where the cashier use this app to store transaction, and receive order, and payment with Cash or Credit Card.

现在,我正在为商店收银员建立一个应用程序,收银员使用此应用程序存储交易,接收订单,并使用现金或信用卡付款。

What is the best possible approach for this project's API? SQL or NoSQL, and why

该项目API的最佳方法是什么? SQL或NoSQL,以及为什么

3 个解决方案

#1


3  

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.

SQL和NoSQL数据库不可互换。没有银弹数据库技术。在选择要用于项目的数据库技术时,应考虑利弊。

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.

简短回答:如果您需要处理事务,您的数据可以很好地安排在关系实体中,然后使用SQL。如果您需要处理大量的半结构化或非结构化数据,并且需要水平可伸缩性,那么请使用NoSQL。

If you want to read more about differences between SQL and NoSQL click here or here.

如果您想了解有关SQL和NoSQL之间差异的更多信息,请单击此处或此处。

Some insight on when to use SQL or NoSQL can be found here.

可以在此处找到有关何时使用SQL或NoSQL的一些见解。

#2


3  

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.

由@ A2H解释,SQL和NoSQL取决于你的要求,说NoSQL不安全不准确,这就像说SQL不可扩展......这也不是真的。

Now, for a financial application you will have some non-functional requirements that I can list below:

现在,对于财务应用程序,您将有一些非功能性需求,我可以在下面列出:

  • Secure at file level: if someone has access to the database file will they be able to use this to load the information somewhere else? for example, in SQL Server the login information about the db is included in the files, therefore copying the files without the password will make hard for hackers to steal information.
  • 在文件级别安全:如果有人有权访问数据库文件,他们是否可以使用它来加载其他地方的信息?例如,在SQL Server中,有关db的登录信息包含在文件中,因此复制没有密码的文件将使黑客难以窃取信息。

  • Scalable: How much,are we talking about? some millions records? Scalable in what sense, do you require to do distributed queries or just localized databases depending on the region and central tables for accounts info? or are you planning to create an application that will receive tons of records per second (like forex information) and therefore you need something to ingest tons of records and analyse results? in that case maybe NoSQL is for you.
  • 可扩展:我们在说多少钱?几百万条记录?在什么意义上可扩展,您需要执行分布式查询还是仅需要本地化数据库,具体取决于帐户信息的区域和*表?或者您打算创建一个每秒接收大量记录的应用程序(如外汇信息),因此您需要一些东西来摄取大量记录并分析结果?在这种情况下,NoSQL可能适合您。

  • Transaction (ACID) complaint: Are you handling transactions (like the type of debit this credit this other?) then you might need to use something like Djondb or traditional RDBMS, both support transactions.
  • 交易(ACID)投诉:您是否正在处理交易(比如此信用借方的类型?)然后您可能需要使用像Djondb或传统RDBMS这样的支持交易。

  • Flexible schemas: You need a flexible schema that can adapts to your frequent changes without having to redesign your database and updating previous records? NoSQL is good at this.
  • 灵活的模式:您需要一个灵活的模式,可以适应您的频繁更改,而无需重新设计数据库和更新以前的记录? NoSQL很擅长这个。

the list will continue... but I think you get the idea...

列表将继续......但我认为你明白了......

Saying that NoSQL is un-secure is an overstatement, as any other generalisation.

如同任何其他概括一样,说NoSQL不安全是一种夸大其词。

#3


0  

Maybe I think one of the reasons is "nosql doesn't support ACID"

也许我认为其中一个原因是“nosql不支持ACID”

It's same means there is not transaction.

这同样意味着没有交易。

Maybe it can explain why no use nosql for "financial transation".

也许它可以解释为什么不使用nosql进行“财务转换”。

#1


3  

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.

SQL和NoSQL数据库不可互换。没有银弹数据库技术。在选择要用于项目的数据库技术时,应考虑利弊。

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.

简短回答:如果您需要处理事务,您的数据可以很好地安排在关系实体中,然后使用SQL。如果您需要处理大量的半结构化或非结构化数据,并且需要水平可伸缩性,那么请使用NoSQL。

If you want to read more about differences between SQL and NoSQL click here or here.

如果您想了解有关SQL和NoSQL之间差异的更多信息,请单击此处或此处。

Some insight on when to use SQL or NoSQL can be found here.

可以在此处找到有关何时使用SQL或NoSQL的一些见解。

#2


3  

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.

由@ A2H解释,SQL和NoSQL取决于你的要求,说NoSQL不安全不准确,这就像说SQL不可扩展......这也不是真的。

Now, for a financial application you will have some non-functional requirements that I can list below:

现在,对于财务应用程序,您将有一些非功能性需求,我可以在下面列出:

  • Secure at file level: if someone has access to the database file will they be able to use this to load the information somewhere else? for example, in SQL Server the login information about the db is included in the files, therefore copying the files without the password will make hard for hackers to steal information.
  • 在文件级别安全:如果有人有权访问数据库文件,他们是否可以使用它来加载其他地方的信息?例如,在SQL Server中,有关db的登录信息包含在文件中,因此复制没有密码的文件将使黑客难以窃取信息。

  • Scalable: How much,are we talking about? some millions records? Scalable in what sense, do you require to do distributed queries or just localized databases depending on the region and central tables for accounts info? or are you planning to create an application that will receive tons of records per second (like forex information) and therefore you need something to ingest tons of records and analyse results? in that case maybe NoSQL is for you.
  • 可扩展:我们在说多少钱?几百万条记录?在什么意义上可扩展,您需要执行分布式查询还是仅需要本地化数据库,具体取决于帐户信息的区域和*表?或者您打算创建一个每秒接收大量记录的应用程序(如外汇信息),因此您需要一些东西来摄取大量记录并分析结果?在这种情况下,NoSQL可能适合您。

  • Transaction (ACID) complaint: Are you handling transactions (like the type of debit this credit this other?) then you might need to use something like Djondb or traditional RDBMS, both support transactions.
  • 交易(ACID)投诉:您是否正在处理交易(比如此信用借方的类型?)然后您可能需要使用像Djondb或传统RDBMS这样的支持交易。

  • Flexible schemas: You need a flexible schema that can adapts to your frequent changes without having to redesign your database and updating previous records? NoSQL is good at this.
  • 灵活的模式:您需要一个灵活的模式,可以适应您的频繁更改,而无需重新设计数据库和更新以前的记录? NoSQL很擅长这个。

the list will continue... but I think you get the idea...

列表将继续......但我认为你明白了......

Saying that NoSQL is un-secure is an overstatement, as any other generalisation.

如同任何其他概括一样,说NoSQL不安全是一种夸大其词。

#3


0  

Maybe I think one of the reasons is "nosql doesn't support ACID"

也许我认为其中一个原因是“nosql不支持ACID”

It's same means there is not transaction.

这同样意味着没有交易。

Maybe it can explain why no use nosql for "financial transation".

也许它可以解释为什么不使用nosql进行“财务转换”。