Deadlock Prevention

What
Deadlock prevention is a method of dealing with? deadlocks. Judging from the name, it prevents the deadlocks before they can happen, even if means aborting the transactions.

Strategies
Assume that $$T_i$$ wants a lock that $$T_j$$ holds:
 * Wait-Die - If $$T_i$$ is older than $$T_j$$, $$T_i$$ waits. Otherwise, $$T_i$$ aborts
 * Wound-Wait - If $$T_i$$ is older, $$T_j$$ aborts. Otherwise, $$T_i$$ waits.