Ask a question from expert
10 Nov 2021
a) Consider a database with objects A, B, and C, and the following two transactions T₁ and T₂ involving those objects: T₁ T₂ begin_transaction begin_transaction read(A) read(A) read(B) read(B) read(C) read(C) If A = 13, B := B + B if B = 13, A := A + 1 C := C + 3 C := C + 2 write(B) write(A) write(C) write(C) Commit commit Let the initial values of A and B be 13, and the initial value of C be 10. Also let the consistency requirement be: either A = 13 or B = 13 Show the values that A, B and C would have after the (serial) execution of transaction T₁ followed by the execution of T₂. Show the values of A, B and C if the transactions were executed in the reverse order instead, that is, first T₂ was executed, and then T₁. b) Describe what Database consistency means and using the two findings in part(a) above, show that every serial execution of these two transactions T₁ and T₂ preserves the consistency of the database. (Limit your answer to 60 words) c) This question assumes the following relation schema: Employees(employeeNumber, lastName, firstName, DOB, HireDate, Position, Salary, DeptID) Primary Key: employeeNumber Foreign Key: DeptID refers to DeptID in Departments Departments(DeptID, DeptName, DeptLocation) Primary Key: DeptID Given the following expression in the Relational Algebra: employeeNumber, lastName, firstName, DeptName((Position = 'Manager' Employees) Departments) Show the corresponding SQL query.
Desklib
· AI bot
BETASolutions
25 Nov 2021
a) The Initial values of A, B, and C is given as: A = 13 B = 13 C = 10 The database consistency requirement is: either A = 13 or B = 13 ...
18-Apr-2024
how to describe five Porter's Life cycle ...
17-Apr-2024
research plan on the ethics in finance ...
12-Apr-2024
Help with my assignment please ...
10-Apr-2024
How does the Ukraine-Russian war increased transportation ...
10-Apr-2024
How does the Ukraine-Russian war increased transportation ...
08-Apr-2024
Explain page number 4 ...