0

When people talk about properties of the transaction, people always say the trasaction has four properties, ACID. For durability, a usual explanation is

Durability means that, once a transaction is committed, it will remain in the system – even if there’s a system crash immediately following the transaction.

I'm a bit confused about this. Isn't durability a property of a database? We use database for data durability. Even if I don't use a transaction, such as using a simple UPDATE directly, my change will still be preserved in the DB.

So why do people emphasize the durability as a property of a transaction?

YangZhao
  • 471
  • 1
  • 4
  • 11
  • It is a property of a transaction and a transaction doesn't exist only when you *explicitely* define one - every statement is its own transaction, so a single update is a transaction and is guaranteed to be durable* (* except where it's not, depending on RDBMS and configuration options) – Stu Mar 23 '22 at 16:04
  • @Stu Thanks for your answer. Does MyISAM also have an implicit transaction even it officially declares it doesn't support transactions? – YangZhao Mar 23 '22 at 16:18
  • 1
    I don't know about any specific RDBMS (you haven't tagged any) but [this](https://stackoverflow.com/questions/8036005/myisam-engine-transaction-support) may be relevant – Stu Mar 23 '22 at 16:27

0 Answers0