Join David Gassner for an in-depth discussion in this video Choosing a JDBC driver, part of Java Database Integration with JDBC.
- View Offline
Applications that use the JDBC API require drivers.…A JDBC driver is a software library that encapsulates the logic you need to communicate between…your application and a database management system or a database file stored on the local hard disk.…All JDBC drivers follow the same set of rules that is the API, that's defined in Java Standard Edition.…A driver library package will contain specific implementations of these Java interfaces.…
Connection, which lets you connect to the database, ResultSet, which encapsulates data returned…from the database, Statement, PreparedStatement, and CallableStatement, which represent requests…to the database, and many more.…Not all JDBC drivers will support all features of the JDBC spec. Check the documentation…for your particular database and your particular driver to see what it's able to do.…But nearly all JDBC drivers will support these five interfaces.…Typically, you'll get your driver packages from the database vendors themselves, a MySQL…driver from MySQL an Oracle driver for Oracle, and so on,…
Author David Gassner explains how to choose a JDBC driver and connect to one or more databases. He also provides detailed instructions on reading, selecting, and updating data; calling stored procedures; managing data via JavaBean classes or with prepared statements; and working with metadata.
- Importing a MySQL database
- Connecting to databases
- Handling JDBC exceptions
- Looping through result sets
- Limiting the number of fetched rows
- Filtering data with prepared statements
- Calling stored procedures
- Inserting, updating, and deleting rows with prepared statements
- Using a persistent database connection
- Committing and rolling back transactions