0
0
MySQLquery~10 mins

ACID properties in MySQL - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start a transaction in MySQL.

MySQL
START [1];
Drag options to blanks, or click blank then click option'
ATRANSACTION
BCOMMIT
CROLLBACK
DSAVEPOINT
Attempts:
3 left
💡 Hint
Common Mistakes
Using COMMIT or ROLLBACK to start a transaction.
Using SAVEPOINT to start a transaction.
2fill in blank
medium

Complete the code to save changes permanently in a transaction.

MySQL
[1];
Drag options to blanks, or click blank then click option'
AROLLBACK
BSTART TRANSACTION
CSAVEPOINT
DCOMMIT
Attempts:
3 left
💡 Hint
Common Mistakes
Using ROLLBACK instead of COMMIT.
Trying to use START TRANSACTION to save changes.
3fill in blank
hard

Fix the error in the code to undo changes in a transaction.

MySQL
[1];
Drag options to blanks, or click blank then click option'
ACOMMIT
BROLLBACK
CSTART TRANSACTION
DSAVEPOINT
Attempts:
3 left
💡 Hint
Common Mistakes
Using COMMIT to undo changes.
Using SAVEPOINT instead of ROLLBACK.
4fill in blank
hard

Fill both blanks to create a savepoint and then rollback to it.

MySQL
SAVEPOINT [1];
ROLLBACK TO [2];
Drag options to blanks, or click blank then click option'
Asp1
Bsp2
Csave1
Dsave2
Attempts:
3 left
💡 Hint
Common Mistakes
Using different names for savepoint and rollback.
Using reserved words as savepoint names.
5fill in blank
hard

Fill the two blanks to demonstrate atomicity by starting a transaction, inserting a row, and committing.

MySQL
START [1];
INSERT INTO users (name) VALUES ('Alice');
[2];
Drag options to blanks, or click blank then click option'
ATRANSACTION
BSAVEPOINT
CROLLBACK
DCOMMIT
Attempts:
3 left
💡 Hint
Common Mistakes
Using ROLLBACK instead of COMMIT.
Not starting the transaction before insert.