首页 | 本学科首页   官方微博 | 高级检索  
     

基于JdbcTemplate的数据库访问处理
引用本文:丁振凡,李馨梅.基于JdbcTemplate的数据库访问处理[J].智能计算机与应用,2012(3):29-32.
作者姓名:丁振凡  李馨梅
作者单位:华东交通大学信息工程学院;东北农业大学理学院
摘    要:Spring JdbcTemplate简化了对数据库的访问处理,详细讨论了JdbcTemplate实现对数据库表格的增、删、改、查询的操作处理方法。分别针对多行数据结果集、单值结果的查询需求,给出相应的JdbcTemplate的不同方法调用。在数据更新处理中,讨论了完整SQL和带参数填充的SQL的方法调用形式。最后,结合文件内容的保存与恢复处理实例,介绍了大容量数据的读写,通过LobCreator对象的setBlobAsBinaryStream方法实现LOB数据的写入,通过LobHandler接口提供的系列方法可获取LOB数据。

关 键 词:Spring  JdbcTemplate  数据库访问  大容量数据的读写

The Access to the Database Processing based on JdbcTemplate
DING Zhenfan,LI Xinmei.The Access to the Database Processing based on JdbcTemplate[J].INTELLIGENT COMPUTER AND APPLICATIONS,2012(3):29-32.
Authors:DING Zhenfan  LI Xinmei
Affiliation:1 School of Information Engineering,East China Jiao Tong University,Nanchang 330013,China;2 College of Science,Northeast Agricultural University,Harbin 150030,China)
Abstract:Spring JdbcTemplate simplifies the access to database,and the CRUD(Create,Retriever,Update,Delete) methods of tables in the database using JdbcTemplate are discussed in the paper.Different method invocations of JdbcTemplate are given respectively for the demands of Multiple rows of data result set and Single value search.In the update processing,Method invocation form of the complete SQL and SQL with Parameters of filling are discussed.At last,combining the save and recovery processing instances of documents,read and write of large capacity data are introduced,implementing the write of LOB data with the setBlobAsBinaryStream method of LobCreator object and implementing the read of LOB data with methods provided by LobHandler interface.
Keywords:Spring  Jdbc Template  Access to Database  Read and Write of Large Capacity Data
本文献已被 CNKI 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号