[1]彭嘉隆 兰全祥.以问题为导向的JDBC优化与实现[J].大众科技,2023,25(10):22-26.
 Optimization and Implementation of Problem-Oriented JDBC[J].Popular Science & Technology,2023,25(10):22-26.
点击复制

以问题为导向的JDBC优化与实现()
分享到:

《大众科技》[ISSN:1008-1151/CN:45-1235/N]

卷:
25
期数:
2023年10
页码:
22-26
栏目:
信息技术与通信
出版日期:
2023-10-20

文章信息/Info

Title:
Optimization and Implementation of Problem-Oriented JDBC
作者:
彭嘉隆 兰全祥
(攀枝花学院,四川 攀枝花 617000)
关键词:
JDBC数据库连接优化数据库操作优化CRUD
Keywords:
JDBCdatabase connection optimizationdatabase operation optimizationCRUD
文献标志码:
A
摘要:
文章介绍了JDBC在程序开发中的实现步骤,阐述了原生JDBC在开发过程中存在的问题。以问题为导向,从数据库连接、数据库操作两方面入手,详细介绍了数据库驱动注册、数据库配置信息加载、数据库连接创建及释放、数据库CRUD操作等产生问题的原因,给出了解决数据库连接和操作的优化方案。经验证,优化方案能够有效解决驱动重复注册、配置信息不灵活、操作效率低、CRUD大量冗余代码等问题。最后,介绍了DBCP、C3P0、Druid、DBUtils、JdbcTemplate等开发中用于数据库连接和操作的类库,为开发人员进行JDBC优化提供参考。
Abstract:
This paper introduces the implementation steps of JDBC in program development, and expounds the problems existing in the development process of native JDBC. This paper introduces in detail the causes of problems in database-driven registration, database configuration information loading, database connection creation and release, and database CRUD operation from two aspects of database connection and database operation, and gives an optimization scheme to solve database connection and operation. It has been proved that the optimization scheme can effectively solve the problems such as driver registration, inflexible configuration information, low operation efficiency and large number of redundant CRUD codes. Finally, the class libraries used for database connection and operation in DBCP, C3P0, Druid, DBUtils, JdbcTemplate are introduced to provide reference for developers to optimize JDBC.

参考文献/References:

[1] 王诚. 研究JDBC连接MySQL数据库技术[J]. 网络安全和信息化,2018(12): 68-69.[2] 葛萌,欧阳宏基,陈伟. 改进JDBC框架的研究与应用[J]. 计算机系统应用,2021,30(6): 107-111.[3] 戴长秀. 连接池访问数据库的研究与应用[J]. 计算机时代,2017(11): 20-22,26.[4] 刘翠霞. Java数据库连接池的原理与应用[J]. 无线互联科技,2020,17(4): 167-168.[5] 陈洁. DBCP数据库连接池的自优化配置[J]. 计算机与现代化,2010(12): 111-114.[6] 张二松. 信息系统的DBCP连接池设计[J]. 信息系统工程,2016(6): 133.[7] 于广和. MySQL数据库服务器下C3P0连接池的配置[J]. 华南金融电脑,2010,18(9): 67.[8] 丁振凡,李馨梅. 基于JdbcTemplate的数据库访问处理[J]. 智能计算机与应用,2012,2(3): 29-32.

备注/Memo

备注/Memo:
【收稿日期】2023-01-03【基金项目】2022年校级大学生创新创业训练计划项目(2022cxcy147);四川省创新创业教育示范课程建设项目(Java Web应用开发实训)(sxsxx2002-2021)。【作者简介】彭嘉隆(2000-),男,四川眉山人,攀枝花学院学生,研究方向为软件开发。
更新日期/Last Update: 2023-10-31