1. Specific contents
JDBC (Java DataBase Connectivity) is a java database connection. In other words, it uses the Java language to operate the database. It turns out that we operate the database by using SQL statements on the console, and JDBC sends SQL statements to the database in Java language. JDBC (Java Data Base Connecti ...
Posted on Sun, 05 Dec 2021 00:40:10 -0500 by empnorton
JDBC is not only the specification of Java operating database, but also the core foundation. The principle of the future framework also encapsulates JDBC and uses reflection, annotation and design patterns to complete simplification.
1, JDBC architecture
JDBC interface (API) includes two levels:Application oriented API: Java ...
Posted on Sun, 28 Nov 2021 02:37:32 -0500 by fukas
JDBC (Java DataBase Connectivity) is a method for Java to connect to a database; In fact, the essence is a set of interfaces customized by SUN company, which can realize the connection between Java and various databases, as shown in the following figure:
Note: This paper uses IDEA demonstration, and the database uses MySQL datab ...
Posted on Sat, 27 Nov 2021 18:07:09 -0500 by heyjohnlim
1. What is a database connection pool
Why use connection pooling: When we develop in Java, we need to access the database, but Java can't access the database directly. We have to establish a connection between the program and the database through JDBC. Performing a transaction requires creating a connection. The process of establishing a co ...
Posted on Thu, 25 Nov 2021 12:07:34 -0500 by PastorHank
1, MyBatis complete example
Here, I'll use an entry-level example to demonstrate how MyBatis works.
Note: the principles and source code in the later chapters of this article will also be explained based on this example. Full sample source address
1.1. Database preparation
In this example, CRUD operation is required for a user table. The da ...
Posted on Wed, 24 Nov 2021 11:12:47 -0500 by jinwu
Database connection is used to send commands and SQL statements to the database server. After the connection is established, you need to access the database and execute SQL statements.
In the java.sql package, there are three interfaces that define different ways to call the database: Statement —|PreparedStatement —| Calla ...
Posted on Mon, 22 Nov 2021 13:03:59 -0500 by jakeruston
it is a tool for java programs to connect and access databases. It is also a manual, which specifies a unified format, the real addition, deletion, modification and query operation needs to be implemented by the database driver package (jar package) (jar package is provided by different ...
Posted on Sat, 20 Nov 2021 06:13:31 -0500 by jamieh
The main contents of this section are as follows:
1, Reflection writing universal insert
when using reflection to complete common database operations, we generally need to formulate some conventions. It is assumed that our database meets the following conventions during design and development:
1. The database table name and entit ...
Posted on Wed, 10 Nov 2021 20:19:17 -0500 by adeelzia
VIII. Database connection pool
8.1 necessity of JDBC database connection pool
8.2 database connection pool technology
8.3 multiple open source database connection pools
8.3.1 C3P0 database connection pool
8.3.2 DBCP database connection pool
8.3.3 Druid database connection pool
VIII. Database connection pool
8.1 necessity of ...
Posted on Thu, 04 Nov 2021 05:20:44 -0400 by InfinityRogue
Configuration files in mybatis
1. Global profile
1.1 properties: read external resources
properties file, read in the form of key value, with =
Create the db.properties file under resources:
Load in global configuration file:
<property name="userName" val ...
Posted on Thu, 21 Oct 2021 19:41:56 -0400 by Gighalen