JDBC: can provide a unified access method for a variety of relational databases, use Java to operate the program
1. JDBC API: Provide various operation access interfaces
Role: 1, establish a connection with the database. 2. Send SQL statements. 3. Return the result
achieve:
DriverManager: manage jdbc driver
Connection: connection
Statement (PreparedStatement): Add, delete, modify and check
CallableStatement: call a stored procedure or stored function in the database
Result: return result
3. Specific steps for jdbc to access the database
a. Import the driver and load the specific driver class
b. Establish a connection
c, send SQL, execute
d. Processing result sets (only used for queries)
2. JDBC DriverManager: manage drivers for different databases
3. Various database drivers (Oracle, MySQL, etc.): provided by their own formula manufacturers, function: connect or directly operate the database