Explain the UNDO/REDO recovery algorithm

Undo/Redo is a database transaction log for handling transaction crash recovery. This algorithm stores all the values and changes made during transactions in a separate memory in case of failure or crash. It utilizes the stored value to restore the loss due to failure. This algorithm is a combination of two approaches UNDO: It stands … Read more

Explain multiple granularity working in concurrency control

Multiple granularity is a database locking technique that allows various data items of different sizes and set locks on them and also defines the hierarchy of data granularity where small granularities are nested within the larger granularity. There are three types of lock granularity Course granularity: It is used to lock tables, files, databases, and … Read more

What is Granularity Locking? How does granularity affect the Performance

Granularity is the size of data items that are allowed to lock. Granularity locking in a Database Management System (DBMS) is a bit like deciding how to organize a shared playroom where everyone wants to play with the toys at the same time. What is Granularity Locking? Granularity locking is all about how big or … Read more

Explanation of Multiple Granularity with suitable example

Granularity means the size of data items that are allowed to lock or the level and information type that a lock protects. Multiple granularities is a database locking technique that allows various data items of different sizes and sets locks on them. And defines the hierarchy of data granularity where small granularities are nested within … Read more

Multi-Version Schemes of Concurrency Control with example

Multi-version protocol minimizes the delay for reading operation and maintains different versions of data items. For each writes operation performed, it creates a new version of transaction data so that whenever any transaction performs read operation to read that data then the appropriate created data version is selected by the control manager to make that … Read more

Optimistic Concurrency Control Techniques, Phases, Advantages

The optimistic control protocol is also called validation-based protocol which copies the transaction data locally and updates the local copy of data instead of actual data in the database. Optimistic Concurrency Control, or OCC, is like playing a game where you assume everything will go smoothly until you reach the end. Instead of checking every move, … Read more

Timestamp ordering of transactions in DBMS

Timestamp ordering is a unique value given to every transaction whenever it comes into the system to execute. There are two types of timestamp values Read timestamp: It is the value of the last transaction which successfully performed the read operation. Write timestamp: It is the value of the last transaction which successfully performed the … Read more

Strict 2-phase Salient features. Explain how cascading rollbacks avoided using strict two-phase locking?

What is Strict 2 phase locking? Strict Two-Phase Locking (Strict 2PL) is a rule used in databases to keep information safe when many people are using it at the same time. It works in two main steps: The strict part means that all write locks (locks put on data that was changed) stay until the … Read more

Locking technique, Its Working, 2-phase locking and Comparison

The locking technique uses a lock that guarantees the exclusive use of data of transactions. The lock is used to restrict different transaction which is executing at the same time. There are 3 phases of Locking technique Taking the lock control and accessing the data of the transaction Complete the transaction execution Release lock There … Read more