Advanced Database Management System: Unit-3 Advanced SQL Quiz

IndividualizedMahoganyObsidian avatar
IndividualizedMahoganyObsidian
·
·
Download

Start Quiz

Study Flashcards

18 Questions

A Transaction is a set of database operations that performs a particular task. A transaction must be completely successful or completely fail without doing anything to maintain database consistency. Example: Successfully Complete Transaction: A task, say fund transfer from one account to another account. To complete a transaction needs to update balance in two accounts – source and destination. It requires two database operations: one, to debit an amount in source account and to credit that amount in destination account. Example: Fail Transaction: In a fund transfer, if a system failure occurs after debiting amount from source account, but before crediting it to destination account then database will be in inconsistent state. So, balance should be updated in both the accounts in both accounts or not in anyone. We can say that a transaction is considered as a sequence of database operations. These operations involve various data manipulation operations such as insert, update and delete. These operations are performed in two steps:  Changes are made in memory only.  Changes are permanently saved to hard disk. A transaction begins with the execution of first SQL statement after a ______ and can be undone using ______ command.

A transaction can be closed by using ______ or ROLLBACK command

COMMIT

To commit a transaction explicitly, user needs to request ______ command explicitly

COMMIT

Security of information stored in database is one of the prime concerns for any ______ management system

database

Oracle provides security to database contents in two ______:  User requiring an access to database must have valid user id and password to get login in the system.  User must have privileges to access contents of the database

phases

GRANT command is used to granting privileges means to give permission to some user to access ______ object or a part of a database object

database

A transaction must be completely successful or completely fail without doing anything to maintain database consistency. Example: Successfully Complete Transaction: A task, say fund transfer from one account to another account. To complete a transaction needs to update balance in two accounts – source and destination. It requires two database operations: one, to debit an amount in source account and to credit that amount in destination account. Example: Fail Transaction: In a fund transfer, if a system failure occurs after debiting amount from source account, but before crediting it to destination account then database will be in inconsistent state. So, balance should be updated in both the accounts in both accounts or not in anyone. We can say that a transaction is considered as a sequence of database operations. These operations involve various data manipulation operations such as insert, update and delete. These operations are performed in two steps:  Changes are made in memory only.

COMMIT

A transaction begins with the execution of first SQL statement after a ______ and can be undone using ______ command.

ROLLBACK

What command is used to undo a transaction?

ROLLBACK

How is a transaction closed in a database?

COMMIT

What is the first SQL statement executed to begin a transaction?

BEGIN

What is the main purpose of the GRANT command in a database?

To give permission to access database objects

What is one of the prime concerns for any database management system?

Security of information

What command is used to explicitly commit a transaction in a database?

COMMIT

Which type of command terminates the current transaction and makes all the changes permanent in a database?

COMMIT

In a banking system, what is an example of a situation that could lead to an inconsistent database state?

Balance update in one account only

What type of command is used to grant privileges to a user for accessing database objects?

GRANT

What is the first SQL statement that marks the beginning of a transaction after a previous transaction has been completed?

START TRANSACTION

Study Notes

Transaction Management

  • A transaction is a set of database operations that performs a particular task, which must be completely successful or completely fail to maintain database consistency.
  • A transaction involves various data manipulation operations such as insert, update, and delete.
  • These operations are performed in two steps: changes are made in memory only, and then changes are permanently saved to hard disk.

Transaction Example

  • A task, such as fund transfer from one account to another account, requires two database operations: debiting an amount in the source account and crediting the amount in the destination account.
  • If a system failure occurs after debiting the amount from the source account but before crediting it to the destination account, the database will be in an inconsistent state.

Transaction Control

  • A transaction begins with the execution of the first SQL statement after a COMMIT command.
  • A transaction can be undone using the ROLLBACK command.
  • To commit a transaction explicitly, the COMMIT command is used.
  • A transaction can be closed using the COMMIT or ROLLBACK command.

Database Security

  • Security of information stored in a database is one of the prime concerns for any database management system.
  • Oracle provides security to database contents in two ways: a user requires a valid user ID and password to log in to the system, and the user must have privileges to access contents of the database.
  • The GRANT command is used to grant privileges to a user for accessing database objects.

Test your knowledge of Transaction Control Language commands in Advanced SQL. Learn about the importance of maintaining database consistency and the concept of successful completion of transactions.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free
Use Quizgecko on...
Browser
Browser