[JDBC] 1. JDBC overview and five ways to connect to the database

JDBC overview JDBC is independent of a specific database and is a common interface for accessing and operating common SQL statements In addition to JDBC, there are also JDO, Hibernate, and Mybatis that can be used for general access to SQL statements, but they only better encapsulate JDBC. In the final analysis, JDBC is still used for databa ...

Posted by JoeZar on Thu, 02 Feb 2023 09:02:21 +0300

[Java+JDBC+MySQL] use Java to operate JDBC and connect to MySQL database

1. Import jar package Copy the jar to the lib directory, right-click the jar package - [Add as Library] and import it into the project 2 operation steps (addition, connection, language, execution and interpretation) 2.1 loading registration driver Register the Driver through the following statement. The principle is that this statement will Cl ...

Posted by Pr0digy on Wed, 18 May 2022 08:08:51 +0300

JDBC (connection, basic addition, deletion, modification and query, PrepareStatement and Statement)

Interface oriented programming Programming steps Get connection Before that, to obtain the mysql driver, you need to put the corresponding jar package under the project: Mode 1 import org.junit.Test; import java.sql.Connection; import java.sql.Driver; import java.sql.SQLException; import java.util.Properties; public class Connectio ...

Posted by toysrfive on Fri, 13 May 2022 08:40:54 +0300

My JDBC learning path

JDBC What is JDBC JDBC (Java database connectivity) is a Java API used to execute SQL statements. It provides unified access to a variety of relational databases. It is composed of a group of classes and interfaces written in Java language Connect database Connect before mysql8 Database driver name: com mysql. jdbc. Driver url connection: ...

Posted by mrhinman on Mon, 09 May 2022 06:28:50 +0300

JDBC [1] - primary addition, deletion, modification and query

[TOC] 1. What is JDBC JDBC (Java database connectivity) is a Java API for executing SQL statements. It can provide unified access to a variety of relational databases. It is composed of a group of classes and interfaces written in Java language. JDBC provides a benchmark by which more advanced tools and interfaces can be built to enable databa ...

Posted by arth on Thu, 05 May 2022 08:55:55 +0300

Secondary development Spark enables JDBC to read Hive data of remote tenant cluster and implement Hive2Hive data integration of Hive in this cluster [Java]

background Shallow SQL boys may only know that after pyspark constructs the sparkSession object [of course, enableHiveSupport], write an SQL: spark.sql("write a SQL string here"); Then spark will complete various operations of select ing, querying data, inserting and overwriting data into the result table according to the SQL here. ...

Posted by Fearless_Fish on Wed, 04 May 2022 16:16:50 +0300

JDBC Programming: Advanced JDBC Programming

transaction processing Bulk update Returns the automatic primary key DAO 1. Transaction processing What are things? Transaction: The mechanism in the database to ensure the reliability of transactions. JDBC supports the concept of transactions in the database, and in JDBC, transactions are automatically committed by default. There are two wa ...

Posted by pabs1983 on Wed, 04 May 2022 12:30:43 +0300

JDBC programming -- JDBC principle and basic programming

JDBC WHAT IS JDBC Java Database Connectivity: a solution for Java to access databases.JDBC is a milestone solution for Java applications to access databases. Java developers hope to access different databases in the same way to realize the Java operation interface independent of the specific database.JDBC defines a set of standard interfaces, t ...

Posted by giba on Wed, 04 May 2022 06:42:29 +0300

06-Database transactions

Statement: The learning content is from Shang Silicon Valley - Teacher Song Hongkang (recommended): https://www.bilibili.com/video/BV1eJ411c7rf?from=search&seid=8058522927071118751 6.1 Introduction to database transactions Transaction: A set of logical operation units that cause data to change from one state to another. Transaction proc ...

Posted by DragonHighLord on Sun, 01 May 2022 02:24:42 +0300

JDBC tool class - JdbcUtils

JDBC tool class - JdbcUtils(1) preface This series of articles introduces the encapsulation of JDBC tool class - JdbcUtils, and some implementations refer to the JdbcTemplate of Spring framework. Full project address: https://github.com/byx2000/JdbcUtils Detach database configuration According to the analysis of the previous article, we know th ...

Posted by john_6767 on Wed, 27 Apr 2022 05:54:13 +0300