试题详情
单项选择题 Application A is designed to execute the following SQL statements within a single Unit of Work (UOW). UPDATE employee SET salary = salary * 1.1 WHERE empno='000010' UPDATE department SET deptname = 'NEW dept' WHERE deptno='A00'Application B is designed to execute the following SQL statements within a single Unit of Work (UOW). UPDATE department SET deptname = 'OLD DEPT' WHERE deptno='A00' UPDATE employee SET salary = salary * 0.5 WHERE empno='000010' Application A and application B execute their first SQL statement at the same time. When application A and application B try to execute their second SQL statement, a deadlock occurs. What will happen?()

A、The database manager will rollback the transaction in both applications.

B、The database manager will rollback the transaction in one of the two applications.

C、Application B will successfully update the EMPLOYEE and DEPARTMENT tables; Application A will be placed in a lock wait state.

D、Application A will successfully update the EMPLOYEE and DEPARTMENT tables; Application B will terminate when the lock timeout value is reached.

  • B
  • 关注下方微信公众号,在线模考后查看

热门试题