1. Isolation Level
- Read uncommitted: This level allows transactions to read uncommitted data from other transactions, leading to potential dirty reads.
- Read committed: This level allows transactions to read only committed data, preventing dirty reads.
<aside>
💡 Read committed resolve the dirty read problem
</aside>
- Repeatable read: This level prevents dirty reads and also ensures that a transaction always reads the same data for a given query, even if other transactions modify the data in the meantime.
<aside>
💡 Repeatable read is implemented by a row lock. It make sure a transaction always read the same data.
</aside>
- Serializable: This level provides the highest level of isolation and ensures that transactions are executed serially, preventing dirty reads and other anomalies.
<aside>
💡 Serializable is implemented by a table lock(low efficiency). It aims to resolve a problem called phantom read.
A phantom read occurs when a transaction retrieves a set of rows twice and new rows are inserted into or removed from that set by another transaction that is committed in between
</aside>

- Dirty Reads – When a transaction is allowed to read a row that has been modified by another transaction that is not been committed yet that time Dirty Reads occurred. It is mainly occurred because of multiple transactions at a time which is not committed. Dirty reads in SQL can lead to incorrect or inconsistent results and should be prevented through the use of transaction isolation levels. There are mainly four types of common concurrency problems: dirty read, lost read, non-repeatable read and phantom reads.