Home  >  Article  >  Java  >  Where is the code to connect java to sql database generally written?

Where is the code to connect java to sql database generally written?

little bottle
little bottleOriginal
2019-05-10 09:36:567760browse

When calling a database in Java, do you know where the calling program is written? Do you know how it is connected? The editor below will take you to find out together.

Where is the code to connect java to sql database generally written?

#JavaSQL connection code is generally written in Java. You can write it in a Java tool class (created by yourself) or in a configuration file.

Java and SQL databases are connected through jdbc.

What is jdbc?

JDBC (Java DataBase Connectivity, java database connection) is a Java API used to execute SQL statements. It can provide unified access to a variety of relational databases. It consists of a set of classes and interfaces written in the Java language composition.

The above is the detailed content of Where is the code to connect java to sql database generally written?. 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