What is meant by Apex transaction?
An Apex transaction represents a group of operations that are needed to be executed at once. It includes the Data Manipulation Language (DML) and is responsible for querying records. The DML operations in a transaction either success or if anything goes wrong or occurs even with a single record could result in a rollback of the entire transaction.