Explain the concept of database deadlocks and how to prevent them.

Technical