Introduction to Java Enterprise-level development-JDBC (09)

Source: Internet
Author: User
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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.