Which of the following is NOT a characteristic of a database transaction?
Which of the following is the correct order of transaction states in DBMS?
1 Crore+ students have signed up on EduRev. Have you? Download the App |
Which of the following is NOT an acid property of database transactions?
In a database transaction, the rollback operation is used to:
Which of the following isolation levels allows the highest concurrency in database transactions?
Consider the following SQL code:
BEGIN TRANSACTION;
UPDATE Customers SET City = 'New York' WHERE CustomerID = 1;
COMMIT;
What will be the output of this code?
Consider the following SQL code:
BEGIN TRANSACTION;
INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1, 10, '2023-05-15');
INSERT INTO OrderDetails (OrderID, ProductID, Quantity) VALUES (1, 100, 5);
COMMIT;
What will be the output of this code?
Consider the following SQL code:
BEGIN TRANSACTION;
DELETE FROM Customers WHERE CustomerID = 5;
ROLLBACK;
What will be the output of this code?
Consider the following SQL code:
BEGIN TRANSACTION;
UPDATE Products SET Price = Price * 1.1 WHERE Category = 'Electronics';
SAVEPOINT sp1;
UPDATE Products SET Price = Price * 1.2 WHERE Category = 'Furniture';
ROLLBACK TO sp1;
COMMIT;
What will be the output of this code?
Consider the following SQL code:
BEGIN TRANSACTION;
SELECT * FROM Orders;
UPDATE Orders SET OrderDate = '2023-06-01' WHERE OrderID = 1;
SELECT * FROM Orders;
ROLLBACK;
SELECT * FROM Orders;
What will be the output of this code?
Consider the following SQL code:
BEGIN TRANSACTION;
UPDATE Employees SET Salary = Salary + 500 WHERE Department = 'IT';
COMMIT;
Which of the following ACID properties does this code violate?
Consider the following SQL code:
BEGIN TRANSACTION;
INSERT INTO Customers (CustomerID, Name) VALUES (1, 'John');
INSERT INTO Customers (CustomerID, Name) VALUES (1, 'Jane');
COMMIT;
Which of the following ACID properties does this code violate?
Consider the following SQL code:
BEGIN TRANSACTION;
UPDATE Products SET Stock = Stock - 10 WHERE ProductID = 1;
SAVEPOINT sp1;
UPDATE Products SET Stock = Stock - 20 WHERE ProductID = 2;
ROLLBACK TO sp1;
COMMIT;
What will be the output of this code?
Consider the following SQL code:
BEGIN TRANSACTION;
UPDATE Orders SET Status = 'Shipped' WHERE OrderID = 1;
DELETE FROM OrderDetails WHERE OrderID = 1;
COMMIT;
What will be the output of this code?
Consider the following SQL code:
BEGIN TRANSACTION;
SELECT SUM(Quantity) FROM OrderDetails WHERE OrderID = 1;
UPDATE Orders SET TotalQuantity = <result of the previous query> WHERE OrderID = 1;
COMMIT;
Which of the following ACID properties does this code violate?