| 
 | 
| 
  Transaction:                                 
             lock(A)
	     ...
	     lock(B)
	     ...
	     ...
	     lock(X)
	     ...
	     ...
	     unlock(B)
	     ...
	     unlock(X)
	     ...
	     unlock(A) 
	     ...
 | 
The 2 phases:
| 
 | 
|   | 
Notice:
| 
 | 
We saw in the previous example that execution using 2-phase locking results in a consistent database state:
|   | 
| 
 | 
We have also seen an example previously:
|   | 
Notice:
| 
 | 
Execution results in INconsistent database state:
|   |