Java Database Connectivity (JDBC) is an application programming interface (API) for the programming language Java, which defines how a client may access a database. It is Java based data access technology and used for Java database connectivity. It is part of the Java Standard Edition platform, from Oracle Corporation. It provides methods to query and update data in a database, and is oriented towards relational databases. A JDBC-to-ODBC bridge enables connections to any ODBC-accessible data source in the Java virtual machine (JVM) host environment.
JDBC | |
---|---|
Developer(s) | Oracle Corporation |
Stable release | JDBC 4.3
/ September 21, 2017 |
Operating system | Cross-platform |
Type | Data access API |
Website | JDBC API Guide |
History and implementation
Sun Microsystems released JDBC as part of Java Development Kit (JDK) 1.1 on February 19, 1997.Cite error: A <ref>
tag is missing the closing </ref>
(see the help page).)
- Type 2 that calls database vendor native library on a client side. This code then talks to database over the network.
- Type 3, the pure-java driver that talks with the server-side middleware that then talks to the database.
- Type 4, the pure-java driver that uses database native protocol.
Note also a type called an internal JDBC driver - a driver embedded with JRE in Java-enabled SQL databases. It is used for Java stored procedures. This does not fit into the classification scheme above, although it would likely resemble either a type 2 or type 4 driver (depending on whether the database itself is implemented in Java or not). An example of this is the KPRB (Kernel Program Bundled) driver[1] supplied with Oracle RDBMS. "jdbc:default:connection" offers a relatively standard way of making such a connection (at least the Oracle database and Apache Derby support it). However, in the case of an internal JDBC driver, the JDBC client actually runs as part of the database being accessed, and so can access data directly rather than through network protocols.
Sources
- Oracle provides a list of some JDBC drivers and vendors
- Simba Technologies ships an SDK for building custom JDBC Drivers for any custom/proprietary relational data source
- CData Software ships type 4 JDBC Drivers for various applications, databases, and Web APIs.[2]
- RSSBus Type 4 JDBC Drivers for applications, databases, and web services[3]
- DataDirect Technologies provides a comprehensive suite of fast Type 4 JDBC drivers for all major database they advertise as Type 5[4]
- IDS Software provides a Type 3 JDBC driver for concurrent access to all major databases. Supported features include resultset caching, SSL encryption, custom data source, dbShield
- OpenLink Software ships JDBC Drivers for a variety of databases, including Bridges to other data access mechanisms (e.g., ODBC, JDBC) which can provide more functionality than the targeted mechanism
- JDBaccess is a Java persistence library for MySQL and Oracle which defines major database access operations in an easy usable API above JDBC
- JNetDirect provides a suite of fully Sun J2EE certified high-performance JDBC drivers.
- JDBCR4 is a service program written by Scott Klement to allow access to JDBC from RPG on the IBM i.[5]
- HSQLDB is a RDBMS with a JDBC driver and is available under a BSD license.
- SchemaCrawler[6] is an open source API that leverages JDBC, and makes database metadata available as plain old Java objects (POJOs)
See also
- GNU Data Access (GDA)
- Open Database Connectivity (ODBC)
References
- ^
Greenwald, Rick; Stackowiak, Robert; Stern, Jonathan (2004) [1999]. Oracle Essentials: Oracle Database 10g. Essentials Series (3 ed.). Sebastopol, California: O'Reilly Media, Inc. p. 318. ISBN 9780596005856. Retrieved 2016-11-03.
The in-database JDBC driver (JDBC KPRB)[:] Java code uses the JDBC KPRB (Kernel Program Bundled) version to access SQL on the same server.
- ^ "JDBC Drivers - CData Software". CData Software. Retrieved 22 March 2018.
- ^ "JDBC Drivers - CData Software". CData Software. Retrieved 22 March 2018.
- ^ "New Type 5 JDBC Driver — DataDirect Connect".
- ^ "Access External Databases from RPG with JDBCR4 Meat of the Matter". 28 June 2012. Retrieved 12 April 2016.
- ^ Sualeh Fatehi. "SchemaCrawler". SourceForge.
External links
- JDBC API Guide This documentation has examples where the JDBC resources are not closed appropriately (swallowing primary exceptions and being able to cause NullPointerExceptions) and has code prone to SQL injection[citation needed]
java.sql
API Javadoc documentationjavax.sql
API Javadoc documentation- O/R Broker Scala JDBC framework
- SqlTool Open source, command-line, generic JDBC client utility. Works with any JDBC-supporting database.
- JDBC URL Strings and related information of All Databases.