search
HomeJavaJavaBaseWhat is jdbc and its function
What is jdbc and its functionJul 01, 2020 pm 01:16 PM
jdbc

Java Database Connectivity, [Java Database Connectivity, JDBC for short] is an application programming interface in the Java language that is used to standardize how client programs access the database, providing methods such as querying and updating data in the database.

What is jdbc and its function

Java Database Connectivity, (JDBC for short) is an application programming interface in the Java language that is used to standardize how client programs access the database. It provides Methods such as querying and updating data in the database. JDBC is also a trademark of Sun Microsystems. What we usually call JDBC is for relational databases.

DBC drivers are divided into four types:

Type 1

JDBC-ODBC Bridge

This type of driver passes all JDBC calls to ODBC, and then let the latter call the database local driver code (that is, the database operation binary code library provided by the database manufacturer, such as oci.dll in Oracle).

Type 2

Local API driver

This type of driver accesses the database by loading the local code library (C/C, etc.) provided by the database manufacturer through the client, and The driver contains Java code.

Type 3

Network Protocol Driver

This type of driver provides a network API to the client. The JDBC driver on the client uses Socket ) to call the middleware program on the server, which converts its request into the specific API call required.

Type 4

Local protocol driver

This type of driver uses Socket to communicate directly between the client and the database.

The following is a list of ways to connect various databases using JDBC:

⒈Oracle8/8i/9i database (thin mode)

⒉DB2 database

⒊Sql Server7 .0/2000 database

⒋Sybase database

⒌Informix database

⒍MySQL database

⒎PostgreSQL database

⒏access database direct connection using ODBC

When accessing a remote database, JDBC will utilize the Internet file addressing scheme and a file name that looks very much like a web page address (Uniform Resource Locator URL).

JDBC specifies a set of object-oriented classes for programmers to use when writing SQL requests. There is an additional set of classes that describe the JDBC driver API. The most common SQL data types that can be mapped to Java data types are supported. This API provides execution support for Microsoft Transaction Server requests and the ability to commit and rollback to the beginning of the transaction.

Recommended tutorial: "java tutorial"

The above is the detailed content of What is jdbc and its function. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Java8(291)之后禁用了TLS1.1使JDBC无法用SSL连接SqlServer2008怎么解决Java8(291)之后禁用了TLS1.1使JDBC无法用SSL连接SqlServer2008怎么解决May 16, 2023 pm 11:55 PM

Java8-291之后,禁用了TLS1.1,使JDBC无法用SSL连接SqlServer2008怎么办,以下是解决办法修改java.security文件1.找到jre的java.security文件如果是jre,在{JAVA_HOME}/jre/lib/security中,比如????C:\ProgramFiles\Java\jre1.8.0_301\lib\security如果是Eclipse绿色免安装便携版在安装文件夹搜索java.security,比如????xxx\plugins\org

Java使用JDBC API连接MySQL数据库遇到的常见问题Java使用JDBC API连接MySQL数据库遇到的常见问题Jun 10, 2023 am 09:55 AM

近年来,Java语言的应用越来越广泛,而JDBCAPI是Java应用程序中与数据库交互的一种创造性方法,JDBC基于一种名为ODBC的开放数据库连接标准,使得Java应用程序能够连入任何数据库管理系统(DBMS)。其中,MySQL更是一款备受青睐的数据库管理系统。然而,连接MySQL数据库时,开发人员也会遇到一些常见问题,本文旨在介绍JDBCAPI连接M

Java错误:JDBC错误,如何解决和避免Java错误:JDBC错误,如何解决和避免Jun 24, 2023 pm 02:40 PM

随着Java的广泛应用,Java程序在连接数据库时经常会出现JDBC错误。JDBC(JavaDatabaseConnectivity)是Java中用于连接数据库的编程接口,因此,JDBC错误是在Java程序与数据库交互时遇到的一种错误。下面将介绍一些最常见的JDBC错误及如何解决和避免它们。ClassNotFoundException这是最常见的JDBC

Java如何实现JDBC批量插入Java如何实现JDBC批量插入May 18, 2023 am 10:02 AM

一、说明在JDBC中,executeBatch这个方法可以将多条dml语句批量执行,效率比单条执行executeUpdate高很多,这是什么原理呢?在mysql和oracle中又是如何实现批量执行的呢?本文将给大家介绍这背后的原理。二、实验介绍本实验将通过以下三步进行a.记录jdbc在mysql中批量执行和单条执行的耗时b.记录jdbc在oracle中批量执行和单条执行的耗时c.记录oracleplsql批量执行和单条执行的耗时相关java和数据库版本如下:Java17,Mysql8,Oracl

MySQL中的JDBC编程该如何分析MySQL中的JDBC编程该如何分析May 30, 2023 pm 10:19 PM

一、数据库编程的必备条件编程语言,如Java,C、C++、Python等数据库,如Oracle,MySQL,SQLServer等数据库驱动包:不同的数据库,对应不同的编程语言提供了不同的数据库驱动包,如:MySQL提供了Java的驱动包mysql-connector-java,需要基于Java操作MySQL即需要该驱动包。同样的,要基于Java操作Oracle数据库则需要Oracle的数据库驱动包ojdbc。二、Java的数据库编程:JDBCJDBC,即JavaDatabaseConnectiv

MySQL如何实现JDBCMySQL如何实现JDBCMay 27, 2023 am 11:06 AM

JDBC基础入门概念JDBC(JavaDataBaseConnectivity,java数据库连接)是一种用于执行SQL语句的JavaAPI,可以为多种关系型数据库提供统一访问,它是由一组用Java语言编写的类和接口组成的。  JDBC规范定义接口,具体的实现由各大数据库厂商来实现。JDBC是Java访问数据库的标准规范,真正怎么操作数据库还需要具体的实现类,也就是数据库驱动。每个数据库厂商根据自家数据库的通信格式编写好自己数据库的驱动。所以我们只需要会调用J

Hibernate 框架与 JDBC 的区别是什么?Hibernate 框架与 JDBC 的区别是什么?Apr 17, 2024 am 10:33 AM

Hibernate与JDBC的区别:抽象级别:Hibernate提供高级对象映射和查询生成,而JDBC需要手动编写代码。对象-关系映射:Hibernate映射Java对象和数据库表,而JDBC不提供此功能。查询生成:Hibernate使用HQL简化查询生成,而JDBC需要编写复杂的SQL查询。事务管理:Hibernate自动管理事务,而JDBC需要手动管理。

如何使用Java构建JDBC应用程序?如何使用Java构建JDBC应用程序?May 08, 2023 pm 11:25 PM

1、加载数据库驱动。通常使用Class类的forName()静态方法来加载驱动。例如如下代码://加载驱动Class.forName(driverClass)2、通过DriverManager获取数据库连接。DriverManager提供了如下方法://获取数据库连接DriverManager.getConnection(Stringurl,Stringuser,Stringpassword);3、通过Connection对象创建Statement对象。Connection创建Statement

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!