Recap – CRUD Operations¶
Let us recap the process of performing CRUD operations
- Establish connection to the database – Create Connection Object
- Create Cursor Object using Connection Object –
- Build Statement to perform one or more
- When we perform DML operations as part of transactions such as
DELETEmake sure transactions without exceptions are committed and transactions with exceptions are rolled back.
- Make sure cursors as well as connections are closed
- If the database operation involves select only, then we don’t need to commit or rollback.
SELECTonly reads the data, it will not make any changes to the data in the database.