1 / 9

JDBC Introduction

JDBC Introduction. Section 1. What is JDBC. JDBC (Java Database Connectivity) is a standard Java interface for connecting to relational databases from Java.

donkor
Télécharger la présentation

JDBC Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JDBC Introduction Section 1

  2. What is JDBC • JDBC (Java Database Connectivity) is a standard Java interface for connecting to relational databases from Java. • The JDBC standard was defined by Sun Microsystems, allowing individual providers to implement and extend the standard with their own JDBC drivers. • JDBC is based on the X/Open SQL Call Level Interface, and complies with the SQL92 Entry Level standard.

  3. JDBC Technology Core Features • Ease of programming - Scrollable result set ability to move a result set's cursor to a specific row. This feature is used by GUI tools and for programmatic updating. • Updateable result set ability to use Java programming language commands rather than SQL.

  4. New data types support performance improvement (ability to manipulate large objects such as BLOB and CLOB without bringing them to the client from the DB server). • Batch updates performance improvement (sending multiple updates to the DB for processing as a batch can be much more efficient than sending update statements separately).

  5. JDBC API • The JDBC API is a Java API for accessing virtually any kind of tabular data. • The JDBC API consists of a series of abstract Java interface to address standard database query requirements: connecting to a particular databases, executing SQL statements, and processing the results of the queries.

  6. JDBC Driver • To use the JDBC API with a particular database management system, you need a JDBC technology-based driver to mediate between JDBC technology and the database.

  7. What Does JDBC Driver do? A JDBC technology-based driver ("JDBC driver") makes it possible to do three things: • Establish a connection with a data source • Send queries and update statements to the data source • Process the results

  8. Primary JDBC Classes • JDBC consists of an object hierarchy, starting with the DriverManager class. • From the DriverManager class, you get Connection objects that point to the particular database. • From the Connection class, you get Statement objects that act as containers for a particular SQL statement execution. • As part of executing a statement, you may get a ResultSet object that describes that results set you got back from a particular SQL SELECT.

  9. JDBC Class Relationships Driver Manager Connection Object Connection Object Connection Object Statement Object Statement Object Statement Object Statement Object ResultSet Object ResultSet Object ResultSet Object

More Related