LightMySky
به انگلیسی

Transactions and the ACID Promise

A transaction groups statements so they take effect together or not at all, keep the database's rules true, do not see each other half-done, and survive a crash once committed. Those four promises are what let application code stay simple.

شروع یادگیری این موضوعبه حساب کاربری نیازی نیست. پیشرفت در همین مرورگر ذخیره می‌شود.

کارهایی که یادگیرنده بعد از این درس می‌تواند انجام دهد

  • State each of the four properties in terms of what a failure would otherwise leave behind
  • Identify a sequence of statements that has to be one transaction
  • Explain what rollback restores and what it cannot undo

۱ · بخوان

A transaction is a bundle of steps the database runs together. Atomicity means all or nothing: either every step happens or none do, so money never leaves one account without arriving in the other.

Consistency means each transaction moves the database from one valid state to another, never breaking rules like a balance never dropping below zero. Isolation means concurrent transactions never see each other half done, as if each ran alone.

Try it together

Durability means committed work survives even a crash right after, because the database keeps a log it can replay. Rollback is the undo button for a transaction that cannot finish: it wipes partial steps and restores the last valid state. It cannot reach work already committed, and it cannot recall anything that has left the database, like a confirmation email already sent.

Group statements that must stand together into one transaction, such as debit plus credit in a transfer. The database then handles the hard parts: no partial updates, no broken rules, no mixed overlaps, and no lost work.

Bundle related steps, and atomicity, consistency, isolation, and durability cover the failures for you.

The rewritten reading was written for this dataset.

۲ · ببین

به انگلیسی

دور از صفحه‌نمایش

چاپ کاربرگکاغذ A4، با یک صفحهٔ جواب‌ها برای بزرگ‌ترها. بدون صفحه‌نمایش، بدون اینترنت.

جایگاه این موضوع

اول این‌ها را یاد بگیر

این موضوع راه این‌ها را باز می‌کند

سپس تمرین

۸ سؤال پشت این درس منتظرند، هر کدام با پاسخ توضیح‌داده‌شده. هر پاسخ آسمان را پر می‌کند: ستاره‌ها هنگام یادگیری روشن می‌شوند و وقتی زمان برگشتن است کمرنگ می‌شوند.

شروع یادگیری این موضوع