46148155-Java-Ppt-Jdbc

11
JDB C The Java Database Connectivity (JDBC) API enables you to send SQL statements to any type of relational database from a Java application. The JDBC API provides classes and interfaces that can be used to write database applications in 100% Pure Java. Using the JDBC API, you can write one Java application to send SQL statements to any type of database at run time. JDBC is secure and portable across any kind of Java platform. JDBC allows you to connect to a database execute SQL statements process the results of SQL queries

description

testing

Transcript of 46148155-Java-Ppt-Jdbc

Page 1: 46148155-Java-Ppt-Jdbc

JDBC– The Java Database Connectivity (JDBC) API enables you to send SQL

statements to any type of relational database from a Java application.

– The JDBC API provides classes and interfaces that can be used to write database applications in 100% Pure Java.

– Using the JDBC API, you can write one Java application to send SQL statements to any type of database at run time.

– JDBC is secure and portable across any kind of Java platform.

– JDBC allows you to• connect to a database• execute SQL statements• process the results of SQL queries

Page 2: 46148155-Java-Ppt-Jdbc

JDBC– The JDBC API provides support for both two-tier and

three-tier database access models.

– In the two-tier model the Java application client has direct communication with the database.

– A JDBC driver sits on the client machine.

– However, the database itself probably resides on another machine - the server.

– The JDBC driver communicates with the target database.

– SQL statements are issued to this database.

– And the user receives the appropriate results.

– Communication between the application (client) and the database (server) can take place over an intranet or the Internet.

– Communication between the application and the database is based on a DBMS-proprietary protocol.

Page 3: 46148155-Java-Ppt-Jdbc

JDBCThe middle tier receives the SQL statements issued from

the client application.

This tier forwards these statements to the database.

The database processes the statements and sends them back to the user through the middle tier.

The client machine communicates with the middle tier using such protocols as Hypertext Transfer Protocol (HTTP) or Remote Method Invocation (RMI).

Whereas the middle tier and database communication are governed by a DBMS-proprietary protocol.

Page 4: 46148155-Java-Ppt-Jdbc

JDBC

Page 5: 46148155-Java-Ppt-Jdbc

Introducing Classes

Page 6: 46148155-Java-Ppt-Jdbc

JDBC

Page 7: 46148155-Java-Ppt-Jdbc

JDBC

Page 8: 46148155-Java-Ppt-Jdbc

A Closer Look at Methods and Classes

Page 9: 46148155-Java-Ppt-Jdbc

JDBC

Page 10: 46148155-Java-Ppt-Jdbc

A Closer Look at Methods and Classes

Page 11: 46148155-Java-Ppt-Jdbc

Inheritance