sql-server - SQL Server 和数据库的 ACID 属性

标签 sql-server database acid

我是数据库和 SQL Server 的新手。

因此,当我在互联网上搜索有关数据库的内容时,我发现如果数据库服从或遵循 ACID,据说该数据库是好的。 (原子性、一致性、隔离性、持久性) 属性。

我想知道 Microsoft SQL Server(当前或以前的任何版本) 是否在内部遵循 ACID 属性,或者如果我们在应用程序中使用 MS SQL Server,那么我们必须以这种方式编写代码我们的应用程序遵循 ACID 属性。

简而言之:维护ACID属性数据库的任务(或责任) 或者它的任务是应用程序员

谢谢..

最佳答案

恕我直言,这是一个双重维护。数据库管理员(编写存储过程)和程序员都应该执行 ACID 属性。 SQL Server 在内部维护自己的 ACID 属性,我们不必为此担心。

ACID 属性在 SQL Server 中强制执行。

阅读:Acid Properties of SQL 2005

但这并不意味着数据库会为您处理一切。

根据 Pinal Dave ( blog.sqlauthority.com )

ACID (an acronymn for Atomicity Consistency Isolation Durability) is a concept that Database Professionals generally look for when evaluating databases and application architectures. For a reliable database all this four attributes should be achieved.

Atomicity is an all-or-none proposition.

Consistency guarantees that a transaction never leaves your database in a half-finished state.

Isolation keeps transactions separated from each other until they’re finished.

Durability guarantees that the database will keep track of pending changes in such a way that the server can recover from an abnormal termination.

Above four rules are very important for any developers dealing with databases.

这适用于处理数据库的开发人员。

但是应用程序开发人员还应该编写执行 ACID 属性的业务逻辑。

关于 Practical use of ACID properties 的例子我猜会帮助你更多

关于sql-server - SQL Server 和数据库的 ACID 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6633808/

相关文章:

PHP 表单到数据库

java - 与本地 mysql 数据库连接时,getConnection 不是 JDBC 中的连接

android - 在 Firestore 事务中更新同一文档的多个字段时的定价

sql-server - 通过在T-SQL中设置种子从均匀分布生成随机值

c# - SQL 服务器 (0x80131904) : String or binary data would be truncated

mysql - 在数据库中存储照片引用的最有效方法

python - Python 中任何与 ACID 在数据库中具有相同安全性的写入函数

internet-explorer - IE9酸3测试?

sql - 最佳Sql数据异常检查REGEX

sql - SQL Server 数据透视表中为空?