Granularity locking Explanation, How does granularity affect the performance

Granularity is the size of data items that are allowed to lock. There are three types of lock granularity Course granularity: It is used to lock tables, files, databases, and records. It reduces the transaction number and decreases the throughput to increase the response time of the transaction. But this also causes the concurrency to … 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. It works in three phases Read phase: All transaction data are read and stored in a temporary variable which is also called the local variable of that … Read more

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

Strict 2 phase locking This locking technique satisfies the basic 2 phase locking but holds all the exclusive locks until the transaction is committed or aborted during the execution. Some silent features of strict two-phase locking It ensures the transaction should be recoverable and cascadeless. It provides serializability. It provides the guarantee to strict schedules. … 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 for concurrency control?

Concurrency control is a method of managing multiple transactions or operations that are running simultaneously. It occurs in the multiuser system, where more than one user executes some transaction at the same time. Executing any transaction simultaneously will lead to inefficient system performance, very high waiting time and response time, and decrease resource utilization without … 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

A transaction is a set of operations used to perform a logical unit of work. It also refers to the change in the database. 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 … 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. Single-user database system Multi-user database system It supports a … Read more