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

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

Explanation of Lost Update Problem and Dirty Read Problem

Lost update and dirty read problem both are issues that appear due to uncontrolled execution of the concurrent transaction. Lost Update Problem A lost update problem appears when at least two transactions access the same transaction data and performs their operation. As we know, the data of transaction if the first read by the system … Read more

What is the need of Concurrency Control?

Imagine a busy kitchen where many cooks are preparing different dishes at the same time. They need to share ingredients, utensils, and cooking stations without getting in each other’s way. This is a bit like what happens in a computer database, where concurrency control is the rulebook that helps everyone work together smoothly. We need … Read more

ACID Properties Of Transaction in DBMS

Atomicity It states that a transaction must be treated as a single atomic unit i.e. Either transaction executed successfully or completely failed. It should not stuck in between or execute partially. The states of the transaction should be defined before execution or after the execution or failure or abortion of the transaction. For example: Suppose … Read more

Transactions in DBMS, Its states and ACID Properties

The transaction is executed as a single unit and should be atomic, consistent, isolated, and durable. This ACID property of transaction maintains the integrity of the data during the execution of the database. What is Transaction in DBMS? In a Database Management System (DBMS), a transaction is a series of operations or steps that are … Read more

Comparison between Single-User and Multi-User System

The main difference between the single-user and multi-user system are single-user system supports a maximum of one user to access the database but multi-user system supports a minimum of 2 users to access the database simultaneously. Below we have written various comparison for your better understanding. What is Single-User System? A Single-user System is designed … Read more