0
0
PostgreSQLquery~10 mins

Transaction isolation levels in PostgreSQL - Interactive Code Practice

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

Complete the code to set the transaction isolation level to READ COMMITTED in PostgreSQL.

PostgreSQL
SET TRANSACTION ISOLATION LEVEL [1];
Drag options to blanks, or click blank then click option'
AREAD UNCOMMITTED
BSERIALIZABLE
CREPEATABLE READ
DREAD COMMITTED
Attempts:
3 left
💡 Hint
Common Mistakes
Using READ UNCOMMITTED which is not supported in PostgreSQL.
Confusing REPEATABLE READ with READ COMMITTED.
2fill in blank
medium

Complete the code to start a transaction with SERIALIZABLE isolation level in PostgreSQL.

PostgreSQL
BEGIN TRANSACTION ISOLATION LEVEL [1];
Drag options to blanks, or click blank then click option'
AREPEATABLE READ
BREAD COMMITTED
CSERIALIZABLE
DREAD UNCOMMITTED
Attempts:
3 left
💡 Hint
Common Mistakes
Using BEGIN without specifying the isolation level.
Choosing REPEATABLE READ instead of SERIALIZABLE.
3fill in blank
hard

Fix the error in the code to set the transaction isolation level to REPEATABLE READ.

PostgreSQL
SET TRANSACTION ISOLATION [1] REPEATABLE READ;
Drag options to blanks, or click blank then click option'
AAS
BLEVEL
CTO
DWITH
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the keyword LEVEL causes syntax errors.
Using TO or AS instead of LEVEL.
4fill in blank
hard

Fill both blanks to complete the command that sets the isolation level to READ UNCOMMITTED (even though PostgreSQL treats it as READ COMMITTED).

PostgreSQL
SET TRANSACTION [1] [2] READ UNCOMMITTED;
Drag options to blanks, or click blank then click option'
AISOLATION
BLEVEL
CTO
DAS
Attempts:
3 left
💡 Hint
Common Mistakes
Using TO or AS instead of ISOLATION LEVEL.
Swapping the order of the keywords.
5fill in blank
hard

Fill all three blanks to complete the command that starts a transaction with REPEATABLE READ isolation level.

PostgreSQL
BEGIN [1] ISOLATION [2] [3];
Drag options to blanks, or click blank then click option'
ATRANSACTION
BLEVEL
CREPEATABLE READ
DSESSION
Attempts:
3 left
💡 Hint
Common Mistakes
Using SESSION instead of TRANSACTION after BEGIN.
Omitting LEVEL keyword.
Using wrong isolation level name.