ควิซ SQL: Transactions & ACID

This SQL quiz covers transactions, the tool that makes several changes succeed or fail together. You will predict data after COMMIT, ROLLBACK and savepoints, match failures to the ACID properties and recognise common isolation problems.

ปานกลาง 10 ข้อ ~6 นาที ผ่านที่ 80% SQLite

เลือกโหมด

กำลังเล่นแบบผู้เยี่ยมชม: เข้าสู่ระบบเพื่อเก็บ XP และ streak

ตัวอย่างคำถาม

ข้อ 1 จาก 10

What does this print?

CREATE TABLE accounts (name TEXT, balance INTEGER);
INSERT INTO accounts VALUES ('Ann', 100), ('Bob', 50);
BEGIN;
UPDATE accounts SET balance = balance - 30 WHERE name = 'Ann';
UPDATE accounts SET balance = balance + 30 WHERE name = 'Bob';
ROLLBACK;
SELECT balance FROM accounts WHERE name = 'Ann';
ดูเฉลย

B. 100 ROLLBACK undoes every change made since BEGIN, so both updates are thrown away and Ann still has 100.

ควิซนี้มีเนื้อหาอะไรบ้าง

  • BEGIN, COMMIT and ROLLBACK
  • Partial undo with SAVEPOINT and ROLLBACK TO
  • Autocommit mode
  • Atomicity, Consistency, Isolation and Durability
  • Isolation levels, dirty reads and non-repeatable reads

คำถามที่พบบ่อย

ต้องมีบัญชีไหม?

ไม่ต้อง ใครก็เล่นได้ เข้าสู่ระบบเพื่อเก็บ XP, streak, เหรียญตรา และประวัติ

ทำซ้ำได้ไหม?

ได้ ระบบเก็บคะแนนที่ดีที่สุดไว้ และสลับคำถามกับตัวเลือกใหม่ทุกครั้ง