Site icon A5THEORY

What Is View Serializable Schedule In DBMS?

view-serializability and view equivalent

view-serializability and view equivalent

Hello Friends, In this blog post(View Serializable Schedule In DBMS), I will let you know about the view serializable schedule. This is related to DBMS.

In this blog post(View Serializable Schedule In DBMS), we are going to let you know What is view serializable schedule is. What is a serializable schedule in the database? How do you tell if a schedule is serializable? How do you test the serializability of a schedule explain with an example.

I guess you probably have heard about the view in the database, Which is a customization presentation of data as per our requirement|View Serializable Schedule In DBMS|

Here this view serializable schedule is a view of its non-serializable view and here we just check whether this serializable schedule of its non-serializable schedule is view equivalent or not|View Serializable Schedule In DBMS|

What is View Serializability?|View Serializable Schedule In DBMS?

View serializability is just a simple process to check whether the given schedule is view serializable or not.

To check whether a given schedule is view serializable, we need to check whether the given schedule is View Equivalent to its serial schedule.

to check the view serializability of a given schedule, we just need to check whether the given schedule is view equivalent to its serial schedule or not.

Let’s see, we understand this with the help of an example given below.

Given Schedule:

Non-Serial

View Serializable:non-serial schedule

Serial Schedule:

As we know in the Serial schedule, a transaction only starts when the current running transaction is finished.

So the serial schedule of the above-given schedule would look like this:

View Serializable: serial schedule

In a serial schedule, a new transaction will start only when the previous transaction has been completed.

You can see the below When T1 has finished all its tasks then only T2 gets started.

So, here if we can prove that this given schedule is view equivalent to its serial schedule then this given schedule will be called view serializable.

Why do we need View Serializability?

As it is known to all of us that if we use a serial schedule then the database will never be trapped in an inconsistent state as no concurrent transactions are running in this schedule.

But with the use of a non-serial schedule, there is a high chance that the database may go inconsistent state as concurrent transactions are allowed in this schedule.

So to just make sure the consistency of the database we need to check the view serializability of a given non-serial schedule.

But there could be one question in your mind instead of checking the view serializability of non-serial schedules, why don’t we have a serial schedule always?

But, this is not feasible from the resources point of view. Because the concurrent executions in non-serial schedules utilize the resources completely or fully. That can’t be missed in the serial schedule.

So now the question is how can we check whether the given schedule is view equivalent to its serial schedule?

Two schedules S1 and S2 are said to be viewed as equivalent if they satisfy all the following conditions given below:

Initial Read:

In this condition, the initial read operations in transactions T1 and T2 must match both schedules.

For example, in schedule S1, T1 reads data x before T2, then in schedule S2, T1 should read data x before T2.

Final Write:

In this condition, the final write operation on the data items must match both schedules.

For example, if T1 writes the data x at last in the schedule in S1 then in schedule S2, T1 should write the data X at last.

Update Read:

In this condition, if T1 reads data X which is written by T2 in S1, then In S2 T1 will read the data X which will be written by T2.

What is View Serializable?

If a schedule is a view equivalent to its serial schedule then the given schedule is said to be View Serializable.

Let’s understand this with the help of another example given below.

In the below image, we have two schedules S1(non-serial) and S2(serial) with the Transactions T1 and T2 in both the schedule.

view serializability example

As we have seen the necessary conditions for the view serializability above, so now we check for those conditions, we these schedules follow all the conditions or not.

Initial Read

Check for data X:

schedule S1, transaction T1 first reads the data item, X. In S2 also transaction T1 first reads the data item, X.

Check for data Y:

In schedule S1, transaction T1 first reads the data item Y. In S2 also the first read operation on Y is performed by T1.

We checked for both data items X & Y and the initial read condition is satisfied in S1 & S2.

Final Write

Check for data X:

In schedule S1, the final write operation on X is done by transaction T2.

In S2 also transaction T2 performs the final write on X.

Check for data Y:

In schedule S1, the final write operation on Y is done by transaction T2. In schedule S2, the final write on Y is done by T2.

We checked for both data items X & Y and the final write condition is satisfied in S1 & S2.

Update Read

Check for data X:

In S1, transaction T2 reads the value of X, written by T1. In S2, the same transaction T2 reads the X after it is written by T1.

Check for data Y:

In S1, transaction T2 reads the value of Y, written by T1. In S2, the same transaction T2 reads the value of Y after it is updated by T1.

The updated read condition is also satisfied for both schedules.

Conclusion:

As S1 and S2 fulfill all the conditions stated above, we can say that S1 and S2 are view equivalent. And S2 is the serial schedule of S1 so we can say that S1 is the view serializable schedule. Within this blog, we have gone through What is view serializable schedule is, What is serializable schedule in the database, how you tell if a schedule is serializable, and how you test the serializability of a schedule explain with an example|View Serializable Schedule In DBMS|

कुछ और extensive blogs पढ़ने के लिए नीचे दी गयी blog लिंक पर क्लिक करें|

What is Normalization and why is it needed?

What is 1NF in DBMS?

What is 2NF in DBMS?

What is 3NF in DBMS?

Third Normal Form In DBMS In Hindi?

Second Normal Form In DBMS In Hindi?

First Normal Form In Dbms In Hindi?

What is the role of DBA in the database…

What do you mean by data replication…

How to achieve Security in DBMS…

Difference between composite key and super key…

View Serializable Schedule In DBMS…

Centralize Database Advantages and Disadvantages In Hindi…

ACID Properties In DBMS In Hindi…

Null Value Problem In Hindi…

Difference Between DBMS and RDBMS in Hindi…

DBMS KEYS IN HINDI…

Candidate key in DBMS in Hindi…

Super key In DBMS In Hindi…

First Normal Form In Dbms In Hindi…

In the case of any queries, you can write to us at a5theorys@gmail.com we will get back to you ASAP|View Serializable Schedule In DBMS|

Hope! you would have enjoyed this post about View Serializable Schedule In DBMS.

Please feel free to give your important feedback in the comment section below|View Serializable Schedule In DBMS|

Have a great time!

Exit mobile version