PHP中轻型的数据库抽象类:ADODB Lite
2008-04-04 17:45
239 查看
在PHP项目开发中,很多架构都是:Smarty + ADODB来做的,因为Smarty功能强大,超过了任何模板处理类,特别是缓存技术。ADODB功能强大,远远超过了PEAR::DB处理类,所以大部分人都选择ADODB做数据库抽象类,但是adodb类库非常庞大,运行速度非常慢,这样也是部分开发人员选择pear DB的原因。
但是,现在为止,这个现象要改变了,因为出来了一个ADODB的小型版: ADODB Lite
据官方网站介绍说:
支持了所有PHP能支持的流行数据库.而且据说比原来的老版本快了很多.
只需要完整版的1/6内存,完全兼容ADODB,据官方说法,可以完全不要改动代码的情况下移植到ADODB Lite下。
看官方网站的说法:
ADOdb Lite was a result of a need for a very small, fast ADOdb library for a browser based game we have been working on for over two years called Alien Assault Traders.
We noticed that the ADOdb package was consuming over 640k of ram for each HTTP access. This was even greater than the amount used by the biggest PHP program file used in the game. In effect the ADODB library was consuming vastly more resources than the game itself. This greatly restricts the number of players that can be online at the same time in respect to the amount of memory required by each client.
Currently, ADOdb Lite uses 80-85k of system ram for each HTTP access. This is about an 87% smaller memory footprint. A side benefit is an increase in speed. The speed increase will vary depending upon the database. This is also a great replacement for extremely HIGH traffic web sites.
We decided to create an ADO database library that was compatible with ADOdb and used far less memory when executed. This library has a very restricted command set and eliminates most of the esoteric commands that will not be used by most websites.
ADOdb Lite is a drop in replacement for ADOdb as long as you are not using unsupported commands on your website.
The following databases are supported:
Databasetype Designator (Database Name)
fbsq (Frontbase)
maxdb (Max DB)
msql (Mini SQL)
mssql (Microsoft SQL)
mysql (MySql)
mysqli (MySql Improved)
mysqlt (MySql w/transactions)
postgres (PostGres)
postgres64 (PostGres 6.4)
postgres7 (PostGres 7)
sqlite (SqLite)
sybase (SyBase)
The only databases that have been fully tested are the MySql databases. Drivers have been provided for the other databases and they should work. I would appreciate it if users would report how well the other database drivers function.
简直是。。。呵呵,我想是许多PHP开发者的喜欢,因为解决了速度问题。
ADODB Lite 目前最新版本是:0.0.6
官方网站:http://adodblite.sourceforge.net/
PS:据它官方网站说,ADODB + Smarty和ADODB Lite + Smarty-Light是最佳组合,呵呵。
by heiyeluren
2005-07-12
但是,现在为止,这个现象要改变了,因为出来了一个ADODB的小型版: ADODB Lite
据官方网站介绍说:
支持了所有PHP能支持的流行数据库.而且据说比原来的老版本快了很多.
只需要完整版的1/6内存,完全兼容ADODB,据官方说法,可以完全不要改动代码的情况下移植到ADODB Lite下。
看官方网站的说法:
ADOdb Lite was a result of a need for a very small, fast ADOdb library for a browser based game we have been working on for over two years called Alien Assault Traders.
We noticed that the ADOdb package was consuming over 640k of ram for each HTTP access. This was even greater than the amount used by the biggest PHP program file used in the game. In effect the ADODB library was consuming vastly more resources than the game itself. This greatly restricts the number of players that can be online at the same time in respect to the amount of memory required by each client.
Currently, ADOdb Lite uses 80-85k of system ram for each HTTP access. This is about an 87% smaller memory footprint. A side benefit is an increase in speed. The speed increase will vary depending upon the database. This is also a great replacement for extremely HIGH traffic web sites.
We decided to create an ADO database library that was compatible with ADOdb and used far less memory when executed. This library has a very restricted command set and eliminates most of the esoteric commands that will not be used by most websites.
ADOdb Lite is a drop in replacement for ADOdb as long as you are not using unsupported commands on your website.
The following databases are supported:
Databasetype Designator (Database Name)
fbsq (Frontbase)
maxdb (Max DB)
msql (Mini SQL)
mssql (Microsoft SQL)
mysql (MySql)
mysqli (MySql Improved)
mysqlt (MySql w/transactions)
postgres (PostGres)
postgres64 (PostGres 6.4)
postgres7 (PostGres 7)
sqlite (SqLite)
sybase (SyBase)
The only databases that have been fully tested are the MySql databases. Drivers have been provided for the other databases and they should work. I would appreciate it if users would report how well the other database drivers function.
简直是。。。呵呵,我想是许多PHP开发者的喜欢,因为解决了速度问题。
ADODB Lite 目前最新版本是:0.0.6
官方网站:http://adodblite.sourceforge.net/
PS:据它官方网站说,ADODB + Smarty和ADODB Lite + Smarty-Light是最佳组合,呵呵。
by heiyeluren
2005-07-12
相关文章推荐
- PHP中轻型的数据库抽象类:ADODB Lite
- PHP中轻型的数据库抽象类:ADODB Lite
- PHP程序中使用adodb连接不同数据库的代码实例
- PHP数据库万能引擎类adodb配置使用以及实例集锦
- 轻型数据库SQLite结合PHP的开发
- ADODB PHP 数据库万能引擎类_2317
- PHP数据库万能引擎类adodb配置使用以及实例集锦
- php运用adodb连接不同数据库(实例)
- ADODB PHP 数据库万能引擎类_2317
- zhphp framework (十九) pdo数据库抽象类
- 轻型数据库SQLite结合PHP的开发
- 轻型数据库SQLite结合PHP的开发
- php 用adodb实现数据库搬家
- php adodb连接不同数据库
- ADODB PHP 数据库万能引擎类(上)
- PHP程序中使用adodb连接不同数据库的代码实例
- php pdo用法及理解(PDO 数据库抽象类 PHP Data Object)
- php adodb连接不同数据库
- php连接数据库 需要下载adodb
- 轻型数据库SQLite结合PHP的开发