What are two phases commit in the database? Explain
Two-phase Commit (2PC) is the feature of transaction processing systems which enables databases that they return to the pre-transaction state if an error condition occurs. The two-phase commit strategy is designed to make sure that either all the databases are updated or none of them is updated. As a result, the databases remain synchronized.