IT용어위키


Durability (ACID)

Durability is one of the four key properties in the ACID Properties of database transactions, ensuring that once a transaction has been committed, its changes are permanently saved in the database. This guarantees that data is not lost even in the event of a system crash, power failure, or hardware malfunction.

Key Concepts

  • Transaction Commit: Durability ensures that when a transaction is committed, its effects are persisted.
  • Non-Volatile Storage: Changes made by a committed transaction are saved to non-volatile storage such as a hard drive or SSD.
  • Crash Recovery: Mechanisms like Write-Ahead Logging (WAL) or checkpoints are used to recover committed transactions after a crash.

Mechanisms Ensuring Durability

Several techniques are employed to ensure durability:

  1. Write-Ahead Logging (WAL):
    • Ensures that all changes are logged before being applied to the database. Logs are stored in stable storage.
  2. Checkpoints:
    • Periodic snapshots of the database state are taken to minimize recovery time in case of a crash.
  3. Redundant Storage:
    • Data is replicated across multiple disks or servers to prevent data loss.
  4. Crash Recovery Algorithms:
    • Algorithms like ARIES help recover the database to the last consistent state after a failure.

Example of Durability

  1. A transaction updates a customer's account balance in a banking application.
  2. The database writes the update to a log (WAL) before modifying the actual data.
  3. The transaction is committed, ensuring the update is stored in non-volatile storage.
  4. Even if the system crashes immediately after, the recovery mechanism uses the log to restore the committed transaction.

Applications

Durability is critical in systems where data consistency and reliability are paramount:

  • Banking and Finance: Ensures that transactions like money transfers are never lost.
  • E-Commerce: Guarantees that orders and payments are persistently saved.
  • Healthcare: Protects critical patient records from being lost in system failures.
  • Enterprise Systems: Ensures the integrity of business-critical operations.

Advantages

  • Data Integrity: Prevents loss of committed data, ensuring database consistency.
  • Reliability: Builds trust in systems handling sensitive or critical information.
  • Crash Recovery: Reduces downtime by enabling automatic recovery.

Challenges

  • Performance Overhead: Durability mechanisms like WAL or replication can slow down write operations.
  • Resource Intensive: Requires additional storage and computational resources.
  • Implementation Complexity: Ensuring durability in distributed systems involves intricate protocols.

Related Concepts and See Also


  출처: IT위키 (IT위키에서 최신 문서 보기)

  * 본 페이지는 IT Wiki에서 미러링된 페이지입니다. 일부 오류나 표현의 누락이 있을 수 있습니다. 원본 문서는 IT Wiki에서 확인하세요!