Which statement is true regarding transactions?

Which statement is true regarding transactions? (Choose all that apply.)

Which statement is true regarding transactions? (Choose all that apply.)

A.
A transaction can consist only of a set of DML and DDL statements.

B.
A p art or an entire transaction can be undone by using ROLLBACK command .

C.
A transaction consists of a set of DML or DCL statements.

D.
A part or an entire transaction can be made permanent with a COMMIT.

E.
A transaction can consist of only a set of queries or DML or DDL statements.



Leave a Reply 14

Your email address will not be published. Required fields are marked *


Casperlw

Casperlw

C
A transaction consists of a set of DML or DCL statements

Should be

A transaction consists of a set of DML or TCL statements?

Justyna

Justyna

DCL – Data Control Language (revoke, grant)

surprise

surprise

C is incorrect.
Revoke and grant do commit.

Vietnam (anticomunism)

Vietnam (anticomunism)

The question mentions “A transaction”.
But “Set of DCL statements” is “Multiple transactions” because each DCL contains an implicit commit statement.
At first, I just choose only B.
This question is not clear!

awiersma

awiersma

oracle documentation:

Transactions apply only to the Data Manipulation Language (DML) portion of the SQL language (such as INSERT, UPDATE, and DELETE). Transactions do not apply to the Data Control Language (DCL) or Data Definition Language (DDL) portions (such as CREATE, DROP, ALTER, and so on.) of the SQL language. DCL and DDL commands always force a commit, which in turn commits everything done before them.

surprise

surprise

awiersma, you agree point C is incorrect?

steven

steven

Oracle document says (http://docs.oracle.com/cd/E11882_01/server.112/e10713/transact.htm)
A database transaction consists of one or more statements. Specifically, a transaction consists of one of the following:

•One or more data manipulation language (DML) statements that together constitute an atomic change to the database

•One data definition language (DDL) statement

A transaction has a beginning and an end.
#######################################################################
It will be better if change ‘•One data definition language (DDL) statement
‘ to ‘•One DDL/DCL statement’.
#######################################################################
I don’t think C is a good choice.

surprise

surprise

C says ‘DCL statements’ – plural. Not one ‘statement’. Not so good…

Justyna

Justyna

http://docs.oracle.com/cd/E11882_01/server.112/e10713/transact.htm

From the same documentation:

Structure of a Transaction

A database transaction consists of one or more statements. Specifically, a transaction consists of one of the following:
•One or more data manipulation language (DML) statements that together constitute an atomic change to the database

•One data definition language (DDL) statement

A transaction has a beginning and an end.

Innez

Innez

so what is the conclusion??

Justyna

Justyna

the conlusion is that it is something worng the question. Maybe mistake in answers…
However from documentation: transactions consists of DML and DDL statements so A is correct.

Sayed

Sayed

A. The AND makes this statement incorrect. There might not be DDL statement always.

B. We can ROLLBACK entire transaction or Using SAVEPOINT to rollback to certain point. So B is true.

C. DML is true. DCL is true assuming COMMIT, ROLLBACK are also DCL.

D. COMMIT works for entire transaction. False

E. Queries make this statement false.

trinath

trinath

https://docs.oracle.com/database/121/CNCPT/transact.htm#CNCPT038

A database transaction consists of one or more statements. Specifically, a transaction consists of one of the following:

One or more data manipulation language (DML) statements that together constitute an atomic change to the database

One data definition language (DDL) statement

Mohan

Mohan

B and D are correct !!!