摘要
作为访问关系数据库的核心标准,JDBC在Java平台的应用上发挥着至关重要的作用,然而它自身的不足增加了直接基于JDBC API应用的复杂度。分析了直接采用JDBC API访问数据库的相关问题,并利用模板方法和回调函数对API进行抽象封装,且给出了相应的实现,最后比较了直接采用JDBC API和对API进行封装后的性能差异,证明该封装与实现是一个良好的实践模型。
As a standard core specification to access relational database, JDBC(Java Database Connectivity) plays an important role in the Java platform applications. However, due to its own deficiency, complexities are introduced into the applications directly based on JDBC API(Application Programming Interface). Some related issues when using JDBC API to access database were discussed, and template method and callback functions were adopted to wrap and implement API. Then, the performances between using JDBC API directly and using wrapped API were compared. It is proved that the latter approach has better performance in application.
出处
《计算机应用》
CSCD
北大核心
2006年第9期2222-2224,共3页
journal of Computer Applications
基金
国家科技攻关资助项目(20041g0113)