Question: Question 1 Bob owns a computer store and sells computers. He has a database with a relation: Sells ( computerName , price ) Bob and

Question 1
Bob owns a computer store and sells computers. He has a database with a relation:
Sells (computerName, price)
Bob and Alice are performing queries on the Sells relation. Assume Each one of Bob's queries run in individual transactions. Assume ALL of Alice's queries run in a SINGLE transaction.
The initial state of the Sells relation is:
Sells( storeName (str), computerName (str), price (float))
( 'Bob store', 'econo computer', 100.00)
( 'Bob store', 'nice computer', 300.00)
Bob will perform the following queries:
(del) DELETE from Sells WHERE storeName = 'Bob store';
(ins) INSERT INTO Sells VALUES ('Bob store', 'super cpu', 800.00);
Alice will perform the following queries:
(min) SELECT min( price ) FROM Sells WHERE storeName = 'Bob store'
(max) SELECT max( price ) FROM Sells WHERE storeName = 'Bob store'
What will the (max) query return for Alice for if queries arrive at the database in the following sequence if Alice is using SERIALIZABLE transaction level?
(del)(ins)(min)(max)
100
300
800
1000
1 points
Question 2
Copy of
Bob owns a computer store and sells computers. He has a database with a relation:
Sells (computerName, price)
Bob and Alice are performing queries on the Sells relation. Assume Each one of Bob's queries run in individual transactions. Assume ALL of Alice's queries run in a SINGLE transaction.
The initial state of the Sells relation is:
Sells( storeName (str), computerName (str), price (float))
( 'Bob store', 'econo computer', 100.00)
( 'Bob store', 'nice computer', 300.00)
Bob will perform the following queries:
(del) DELETE from Sells WHERE storeName = 'Bob store';
(ins) INSERT INTO Sells VALUES ('Bob store', 'super cpu', 800.00);
Alice will perform the following queries:
(min) SELECT min( price ) FROM Sells WHERE storeName = 'Bob store'
(max) SELECT max( price ) FROM Sells WHERE storeName = 'Bob store'
What will the (max) query return for Alice for if queries arrive at the database in the following sequence if Alice is using READ COMMITTED transaction level?
(del)(ins)(min)(max)
100
300
800
1000
1 points
Question 3
Copy of
Copy of
Bob owns a computer store and sells computers. He has a database with a relation:
Sells (computerName, price)
Bob and Alice are performing queries on the Sells relation. Assume ALL of Bob's queries run in a SINGLE transaction. Assume ALL of Alice's queries run in a SINGLE transaction.
The initial state of the Sells relation is:
Sells( storeName (str), computerName (str), price (float))
( 'Bob store', 'econo computer', 100.00)
( 'Bob store', 'nice computer', 300.00)
Bob will perform the following queries:
(del) DELETE from Sells WHERE storeName = 'Bob store';
(ins) INSERT INTO Sells VALUES ('Bob store', 'super cpu', 800.00);
Alice will perform the following queries:
(min) SELECT min( price ) FROM Sells WHERE storeName = 'Bob store'
(max) SELECT max( price ) FROM Sells WHERE storeName = 'Bob store'
What will the (max) query return for Alice for if queries arrive at the database in the following sequence if Alice is using READ UNCOMMITTED transaction level?
(del)(ins)(min)(max)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!