Consider a table Products(name, price). There are two tuples in Products: ('OK',2000) and ('Good',3000). Consider the following two concurrent transactions, each of which runs once and commits. Transaction 1 ----------------- Begin Transaction insert into Products values (`Awesome',4000); update Products set price = price+300 where name=’OK’; commit; Transaction 2 ----------------- Begin Transaction select sum(price) from Products; select sum(price) from Products; commit; The databases serializability module stopped working. What possible values (consistent and inconsistent) can be obtained for the two sum(price) SELECT statements ? NOTE: The second transaction is consisting of only read statements. It may be scheduled between Transaction 1 and may read incosistent values.
Consider a table Products(name, price). There are two tuples in Products: ('OK',2000) and ('Good',3000). Consider the following two concurrent transactions, each of which runs once and commits.
Transaction 1
-----------------
Begin Transaction
insert into Products values (`Awesome',4000);
update Products set price = price+300 where name=’OK’;
commit;
Transaction 2
-----------------
Begin Transaction
select sum(price) from Products;
select sum(price) from Products;
commit;
The
NOTE: The second transaction is consisting of only read statements. It may be scheduled between Transaction 1 and may read incosistent values.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps