This chapter covers both basic and commonly used interactions between a Java application and a database (DB), right from connecting to the DB and performing CRUD operations to creating transactions, storing procedures, and working with large objects (LOBs). We will be covering the following recipes:
- Connecting to a database using JDBC
- Setting up the tables required for DB interactions
- Performing CRUD operations using JDBC
- Using the Hikari Connection Pool (HikariCP)
- Using prepared statements
- Using transactions
- Working with large objects
- Executing stored procedures
- Using batch operations for a large set of data
- Using MyBatis for CRUD operations
- Using the Java Persistence API and Hibernate