I. Introduction of JDBC
JDBC is all called: Java database Connectivity (connection to Java databases).
Sun's simplified and Unified operation of the database defines a set of Java Operational Database specifications, called JDBC.
No JDBC
After having JDBC
Second, the JDBC API common classes and interfaces
The JDBC API is under the java.sql and the two packages of javax.sql, which you should pay attention to when your classmates lead the package.
The diagram is a relationship of several core classes.
DriverManager: Database-driven management class.
Connection: An interface that establishes an interface to a database connection.
Statement,preparedstatment,callablestatment: interface: Sends SQL to the database and obtains the information returned by the database.
ResultSet: Result set, statement results are returned after the SQL---Select is executed, and the result is given to ResultSet
Third, the JDBC introductory case----Important
1. To connect to MySQL database. Have a MySQL database and want to start
2. Create a database, create a table, and add some data to the table.
3. Find the MSYQL driver (JDBC implementation Class) and copy it to the project. Build-path
Introduction to Java Enterprise-level development-JDBC (09)