JDBC provides methods to query and update data in a database. dynamically loading the correct Java packages and registerting them with the JDBC Driver Manager, the JDBC Driver Manager is used as a connection factory for creating connections.
Statement – the statement is sent to the database server each and every time.
PreparedStatement – the statement is cached and then the execution path is pre-determined on the database server allowing it to be executed multiple times in an efficient manner.
Update statements return an update count that indicates how many rows were affected in the database.