Week 8 Flashcards
What does DCL stand for?
DCL stands for Data Control Language.
What are the two main commands of DCL?
The two main commands of DCL are GRANT and REVOKE.
What is the purpose of the GRANT command in DCL?
The purpose of the GRANT command in DCL is to give users specific privileges or permissions on database objects such as tables, views, or procedures.
What is the purpose of the REVOKE command in DCL?
The purpose of the REVOKE command in DCL is to take back or remove previously granted permissions or privileges from users.
How does DCL help in database security?
DCL helps in database security by controlling user access to database objects and enforcing restrictions, thus preventing unauthorized operations.
What does TCL stand for?
TCL stands for Transaction Control Language
What are the main commands of TCL?
The main commands of TCL are COMMIT, ROLLBACK, SAVEPOINT, and SET TRANSACTION.
What is the purpose of the COMMIT command in TCL?
The purpose of the COMMIT command in TCL is to permanently save the changes made during a transaction to the database.
What is the purpose of the ROLLBACK command in TCL?
The purpose of the ROLLBACK command in TCL is to undo changes made during a transaction before they are committed.
What is the difference between SAVEPOINT and ROLLBACK?
The difference between SAVEPOINT and ROLLBACK is that SAVEPOINT sets a point in a transaction to which you can later rollback, whereas ROLLBACK undoes all changes made since the beginning of the transaction or since a specified savepoint.
What is a transaction in a database system?
A transaction in a database system is a unit of work that is performed against the database, which can include multiple operations like insertions, updates, and deletions, and must be executed in full or not at all.
What are the four properties of a transaction?
The four properties of a transaction are ACID: Atomicity, Consistency, Isolation, and Durability.
Why are transactions important for database integrity?
Transactions are important for database integrity because they ensure that the database remains in a consistent state, even in cases of failures, by allowing only complete operations to be committed.
How does a transaction help ensure data consistency?
A transaction helps ensure data consistency by ensuring that all operations within the transaction are successfully executed before changes are committed, or none at all.
What happens if a transaction fails?
If a transaction fails, the database can revert to its previous state using ROLLBACK, undoing all operations within the transaction.
What does ACID stand for in the context of transactions?
ACID stands for Atomicity, Consistency, Isolation, and Durability.
What is the ‘Atomicity’ property in ACID?
The Atomicity property ensures that all operations within a transaction are completed successfully or none are applied at all.
What is the ‘Consistency’ property in ACID?
The Consistency property ensures that a transaction brings the database from one valid state to another, maintaining database integrity.
What is the ‘Isolation’ property in ACID?
The Isolation property ensures that transactions are executed independently without interference from other concurrent transactions.
What is the ‘Durability’ property in ACID?
The Durability property ensures that once a transaction is committed, its changes are permanently stored in the database, even in the case of a system failure.
What does the COMMIT command do in a transaction?
The COMMIT command in a transaction saves all changes made during the transaction to the database permanently.
What does the ROLLBACK command do in a transaction?
The ROLLBACK command in a transaction undoes all changes made since the beginning of the transaction or since a savepoint.
What are transaction isolation levels?
Transaction isolation levels define the degree to which transactions are isolated from each other in terms of visibility of data changes.
What is the ‘Read Uncommitted’ isolation level?
The Read Uncommitted isolation level allows a transaction to read uncommitted changes made by other transactions, potentially leading to dirty reads.