The beginTransaction() method is the first step in executing more complex operations where we must
ensure that all SQL commands are executed as a single unit. When you call this method in your library, you instruct
the database to turn off automatic committing of changes. This allows you to safely roll back all changes in case
of any error before they can permanently affect your data.
By including this method in the Database class, we ensure better code organization. When we call this method in our main script, we open the way for the safe execution of multiple operations that must either all succeed or all be rolled back.
beginTransaction() method is the first step toward data integrity (ACID).