NEW
Font size
WorksheetsCA 3 - New
Total questions: 25
Worksheet time: 14mins
What is a transaction in the context of databases?
A transaction is a sequence of operations treated as a single unit of work in a database.
A transaction is a method for deleting records.
A transaction is a type of database backup.
A transaction is a way to visualize data in a database.
List the different states a transaction can be in.
rejected
Active, Partially committed, Committed, Abort, End
completed
processing
Explain the ACID properties of transactions.
Atomicity, Consistency, Isolation, and Reliability
ACID properties are Atomicity, Consistency, Isolation, and Durability.
Accuracy, Clarity, Integrity, and Reliability
Atomicity, Concurrency, Isolation, and Durability
What does 'Atomicity' mean in the context of ACID?
Atomicity means transactions can be split into multiple parts.
Atomicity refers to the speed of transaction processing.
Atomicity ensures that a transaction is all-or-nothing.
Atomicity allows partial transactions to be committed.
Define 'Consistency' in relation to database transactions.
Consistency refers to the speed of database transactions.
Consistency means that all transactions are processed in the same order.
Consistency allows for temporary data loss during transactions.
Consistency ensures that a database remains in a valid state before and after a transaction.
What is the significance of 'Isolation' in transaction management?
Isolation increases the speed of transactions by allowing data duplication.
Isolation prevents transactions from affecting each other, ensuring data integrity.
Isolation allows multiple transactions to run simultaneously without any restrictions.
Isolation is used to combine multiple transactions into a single operation.
Describe 'Durability' and its importance in transactions.
Durability ensures that once a transaction is committed, it remains permanent, even in the event of failures, providing reliability and consistency in data management.
Durability is about the temporary storage of data during transactions.
Durability ensures that transactions can be easily reversed at any time.
Durability refers to the speed of transaction processing.
What are the common transaction control commands in SQL?
COMMIT, ROLLBACK, SAVEPOINT
DELETE
BEGIN TRANSACTION
UPDATE
How does concurrency control affect transaction management?
Concurrency control increases the speed of transaction processing without any drawbacks.
Concurrency control is only necessary for read operations, not for writes.
Concurrency control allows for unlimited simultaneous transactions without issues.
Concurrency control prevents data inconsistencies and ensures data integrity during simultaneous transactions.
What are some common recovery techniques used in databases?
Transaction logging, checkpointing, data replication
Data encryption
Indexing strategies
Query optimization
What role does 'Durability' play in ensuring data integrity after a transaction?
Durability ensures that transactions can be rolled back at any time.
Durability is concerned with the speed of transaction execution.
Durability allows for the temporary storage of transaction data.
Durability guarantees that all changes made by a transaction are saved permanently, even in case of a system failure.
What is the purpose of a 'SAVEPOINT' in transaction management?
A SAVEPOINT allows you to set a point within a transaction to which you can later roll back.
A SAVEPOINT is used to commit a transaction.
A SAVEPOINT is a method for deleting records in a database.
A SAVEPOINT is a type of database backup.
Differentiate between a serial schedule and a non-serial schedule.
Both serial and non-serial schedules execute transactions simultaneously without any order.
A serial schedule can execute multiple transactions at once, while a non-serial schedule cannot.
A serial schedule allows overlapping execution of transactions, while a non-serial schedule executes them sequentially.
A serial schedule executes transactions sequentially without overlap, while a non-serial schedule allows overlapping execution of transactions.
What is serializability and why is it important in database transactions?
Serializability is a technique for improving database performance by reducing storage space.
Serializability is a method for compressing database files.
Serializability allows transactions to run in parallel without any restrictions.
Serializability is crucial in database transactions as it guarantees consistency and correctness of the database, ensuring that concurrent transactions do not interfere with each other.
Why is concurrency necessary in database systems?
Concurrency is necessary to enable simultaneous access, ensure data integrity, and improve performance in database systems.
Concurrency is primarily used for data backup purposes.
Concurrency reduces the complexity of database transactions.
Concurrency is only needed for large databases.
What are some common issues that arise from concurrency in databases?
Common issues from concurrency in databases include lost updates, dirty reads, non-repeatable reads, and phantom reads.
Faster query execution
Increased storage requirements
Data redundancy
Describe one method of concurrency control in SQL.
Locking mechanisms
Timestamping
Optimistic concurrency control
Isolation levels
How does locking help in managing concurrency in databases?
Locking increases the speed of database operations by reducing wait times.
Locking prevents concurrent transactions from conflicting, ensuring data integrity and consistency.
Locking allows multiple transactions to access the same data simultaneously.
Locking is only necessary for read operations, not for writes.
In database normalization, which normal form ensures that each column in a table is dependent on the primary key?
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Fourth Normal Form (4NF)
Which normal form guarantees that there are no non-prime attributes functionally dependent on a proper subset of any candidate key?
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Boyce-Codd Normal Form (BCNF)
A relation is in 1NF if it doesn't contain any ____________?
Determinants
Repeating columns
Null values in primary key fields
Functional dependencies
