For each of the transactions described below, suppose that we insert one lock and one unlock action for each database element that is accessed.
Tell how many orders of the lock, unlock, read, and write actions are:
i. Consistent and two-phase locked.
ii. Consistent, but not two-phase locked.
iii. Inconsistent, but two-phase locked.
iv. Neither consistent nor two-phase locked.