Квиз по 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 и серию.

Пример вопроса

Вопрос 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, серию, значки и историю.

Можно пройти ещё раз?

Да. Лучший результат сохраняется, а вопросы и ответы каждый раз перемешиваются.