简体   繁体   English

数据库并发的工作机制

[英]The mechanism how the database concurrency works

Could some body explain me how the database concurrency works?有人可以解释一下数据库并发是如何工作的吗? I am using HSQLDB.我正在使用 HSQLDB。

For example, if there are two different users to insert a record at the same time from two different entry points, how does the database handle this?例如,如果有两个不同的用户从两个不同的入口点同时插入一条记录,那么数据库是如何处理的呢? Are these two insert commands executed one by one?这两个插入命令是一个一个执行的吗? or at the same time?还是同时?

Feel free to provide any other information if you know.如果您知道,请随时提供任何其他信息。

Many thanks!非常感谢!

Ike艾克

Most databases worth knowing can handle requests from multiple sources.大多数值得了解的数据库都可以处理来自多个来源的请求。 Each request is handled in turn as it comes in. The question is: how are they interleaved?每个请求在进来时都会被依次处理。问题是:它们是如何交错的? This is where isolation and locking come into play.这就是隔离和锁定发挥作用的地方。 I'd recommend that you read up on ACID properties for relational databases.我建议您阅读关系数据库的 ACID 属性。 There's a lot of information available, both for relational and NoSQL databases.有很多可用的信息,包括关系数据库和 NoSQL 数据库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM