ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾PHP ±à³Ì£¾PHP 5 Power programming
Team LiB
Previous Section Next Section

A.6. Database

A.6.1. DB

Repository: PEAR - License: PHP License - By Stig Sæther Bakken (developer) - Tomas V.V.Cox (developer) - Chuck Hagenbuch (helper) - Daniel Convissor (lead)

Database Abstraction Layer

A.6.1.1 Description

DB is a database abstraction layer providing:

  • an OO-style query API

  • portability features that make programs written

    • for one DBMS work with other DBMS's

  • a DSN (data source name) format for specifying

    • database servers

  • prepare/execute (bind) emulation for databases

    • that don't support it natively

  • a result object for each query response

  • portable error codes

  • sequence emulation

  • sequential and non-sequential row fetching as

    • well as bulk fetching

  • formats fetched rows as associative arrays,

    • ordered arrays or objects

  • row limit support

  • transactions support

  • table information interface

  • DocBook and PHPDoc API documentation

DB layers itself on top of PHP's existing database extensions. The currently supported extensions are: dbase, fbsql, interbase, informix, msql, mssql, mysql, mysqli, oci8, odbc, pgsql, sqlite and sybase.

DB is compatible with both PHP 4 and PHP 5.

A.6.2. DBA

Repository: PEAR - License: LGPL - By Brent Cook (lead)

Berkely-style database abstraction class

A.6.2.1 Description

DBA is a wrapper for the php DBA functions. It includes a file-based emulator and provides a uniform, object-based interface for the Berkeley-style database systems.

A.6.3. DBA_Relational

Repository: PEAR - License: LGPL - By Brent Cook (lead)

Berkely-style database abstraction class

A.6.3.1 Description

Table management extension to DBA

A.6.4. dbplus

Repository: PECL - License: PHP License - By Hartmut Holzgraefe (lead)

db++ database functions

A.6.4.1 Description

db++, made by the German company Concept asa, is a relational database system with high performance and low memory and disk usage in mind. While providing SQL as an additional language interface, it is not really a SQL database in the first place but provides its own AQL query language which is much more influenced by the relational algebra then SQL is.

A.6.5. DB_ado

Repository: PEAR - License: LGPL - By Alexios Fakos (lead)

DB driver which use MS ADODB library

A.6.5.1 Description

DB_ado is a database independent query interface definition for Microsoft's ADODB library using PHP's COM extension.

This class allows you to connect to different data sources like MS Access, MS SQL Server, Oracle and other RDBMS on a Win32 operating system. Moreover the possibility exists to use MS Excel spreadsheets, XML, text files and other not relational data as data source.

A.6.6. DB_DataObject

Repository: PEAR - License: PHP License - By Alan Knowles (lead)

An SQL Builder, Object Interface to Database Tables

A.6.6.1 Description

DataObject performs 2 tasks:

  1. Builds SQL statements based on the objects vars and the builder methods.

  2. acts as a datastore for a table row.

The core class is designed to be extended for each of your tables so that you put the data logic inside the data classes. included is a Generator to make your configuration files and your base classes. nd

A.6.7. DB_DataObject_FormBuilder

Repository: PEAR - License: PHP License - By Markus Wolff (lead)

Class to automatically build HTML_QuickForm objects from a DB_DataObject-derived class

A.6.7.1 Description

DB_DataObject_FormBuilder will aid you in rapid application development using the packages DB_DataObject and HTML_QuickForm. For having a quick but working prototype of your application, simply model the database, run DataObject´s createTable script over it and write a script that passes one of the resulting objects to the FormBuilder class. The FormBuilder will automatically generate a simple but working HTML_QuickForm object that you can use to test your application. It also provides a processing method that will automatically detect if an insert() or update() command has to be executed after the form has been submitted. If you have set up DataObject´s links.ini file correctly, it will also automatically detect if a table field is a foreign key and will populate a selectbox with the linked table´s entries. There are many optional parameters that you can place in your DataObjects.ini or in the properties of your derived classes, that you can use to fine-tune the form-generation, gradually turning the prototypes into fully-featured forms, and you can take control at any stage of the process.

A.6.8. DB_ldap

Repository: PEAR - License: LGPL - By Ludovico Magnocavallo (lead) - Piotr Roszatycki (developer)

DB interface to LDAP server

A.6.8.1 Description

The PEAR::DB_ldap class provides a DB compliant interface to LDAP servers

A.6.9. DB_ldap2

Repository: PEAR - License: LGPL - By Piotr Roszatycki (lead)

DB drivers for LDAP v2 and v3 database

A.6.9.1 Description

DB_ldap2 and DB_ldap3 classes extend DB_common to provide DB compliant access to LDAP servers with protocol version 2 and 3. The drivers provide common DB interface as much as possible and support prepare/execute statements.

A.6.10. DB_NestedSet

Repository: PEAR - License: PHP License - By Daniel Khan (lead) - Jason Rust (developer) API to build and query nested sets

A.6.10.1 Description

DB_NestedSet let's you create trees with infinite depth inside a relational database.

The package provides a way to

A.6.11. DB_Pager

Repository: PEAR - License: LGPL - By Tomas V.V.Cox (lead)

Retrieve and return information of database result sets

A.6.11.1 Description

This class handles all the stuff needed for displaying paginated results from a database query of Pear DB. including fetching only the needed rows and giving extensive information for helping build an HTML or GTK query result display.

A.6.12. DB_QueryTool

Repository: PEAR - License: PHP - By Wolfram Kriesing (lead) - Lorenzo Alberton (lead)

An OO-interface for easily retreiving and modifying data in a DB.

A.6.12.1 Description

This package is an OO-abstraction to the SQL-Query language, it provides methods such as setWhere, setOrder, setGroup, setJoin, etc. to easily build queries. It also provides an easy to learn interface that interacts nicely with HTML-forms using arrays that contain the column data, that shall be updated/added in a DB. This package bases on an SQL-Builder which lets you easily build SQL-Statements and execute them.

A.6.13. DB_Table

Repository: PEAR - License: LGPL - By Paul M. Jones (lead)

Builds on PEAR DB to abstract datatypes and automate table creation, data validation, insert, update, delete, and select; combines these with PEAR HTML_QuickForm to automatically generate input forms that match the table column definitions.

A.6.14. Gtk_MDB_Designer

Repository: PEAR - License: PHP License - By Alan Knowles (lead)

An Gtk Database schema designer

A.6.14.1 Description

A graphical database schema designer, based loosely around the MDB schema, it features

  • table boxes which are dragged around a window to layout your database

  • add/delete tables

  • add delete columns

  • support for NotNull, Indexes, Sequences , Unique Indexes and defaults

  • works totally in non-connected mode (eg. no database or setting up required)

  • stores in MDB like xml file.

  • saves to any supported database SQL create tables files.

  • screenshots at http://devel.akbkhome.com/Gtk_MDB/

Future enhancements:

  • real MDB schema exports

  • relationships = with lines etc.

The primary aim is to generate SQL files, (so that I can get my work done) however it is eventually planned to support MDB schema's fully.. - just a matter of time..

To use - just pear install and run gtkmdbdesigner

A.6.15. isis

Repository: - License: BSD -

PHP extension for reading CDS/ISIS databases.

A.6.15.1 Description

This extension adds functionality to PHP in order to read CDS/ISIS databases through the OpenIsis library.

A.6.16. MDB

Repository: PEAR - License: BSD style - By Lukas Kahwe Smith (lead) - Christian Dickmann (contributor) - Paul Cooper (contributor) - Stig Sæther Bakken (contributor) - Tomas V.V.Cox (contributor) - Manuel Lemos (contributor) - Frank M. Kromann (contributor) - Lorenzo Alberton (contributor)

database abstraction layer

A.6.16.1 Description

PEAR MDB is a merge of the PEAR DB and Metabase php database abstraction layers. It provides a common API for all support RDBMS. The main difference to most other DB abstraction packages is that MDB goes much further to ensure portability. Among other things MDB features:

  • An OO-style query API

  • A DSN (data source name) or array format for specifying database servers

  • Datatype abstraction and on demand datatype conversion

  • Portable error codes

  • Sequential and non sequential row fetching as well as bulk fetching

  • Ordered array and associative array for the fetched rows

  • Prepare/execute (bind) emulation

  • Sequence emulation

  • Replace emulation

  • Limited Subselect emulation

  • Row limit support

  • Transactions support

  • Large Object support

  • Index/Unique support

  • Module Framework to load advanced functionality on demand

  • Table information interface

  • RDBMS management methods (creating, dropping, altering)

  • RDBMS independent xml based schema definition management

  • Altering of a DB from a changed xml schema

  • Reverse engineering of xml schemas from an existing DB (currently only MySQL)

  • Full integration into the PEAR Framework

  • Wrappers for the PEAR DB and Metabase APIs

  • PHPDoc API documentation

Currently supported RDBMS:

  • MySQL

  • PostGreSQL

  • Oracle

  • Frontbase

  • Querysim

  • Interbase/Firebird

  • MSSQL

A.6.17. MDB2

Repository: PEAR - License: BSD License - By Lukas Kahwe Smith (lead) - Paul Cooper (contributor) - Frank M. Kromann (contributor) - Lorenzo Alberton (contributor)

database abstraction layer

A.6.17.1 Description

PEAR MDB2 is a merge of the PEAR DB and Metabase php database abstraction layers.

It provides a common API for all support RDBMS. The main difference to most other DB abstraction packages is that MDB2 goes much further to ensure portability. Among other things MDB2 features:

  • An OO-style query API

  • A DSN (data source name) or array format for specifying database servers

  • Datatype abstraction and on demand datatype conversion

  • Portable error codes

  • Sequential and non sequential row fetching as well as bulk fetching

  • Ability to make buffered and unbuffered queries

  • Ordered array and associative array for the fetched rows

  • Prepare/execute (bind) emulation

  • Sequence emulation

  • Replace emulation

  • Limited Subselect emulation

  • Row limit support

  • Transactions support

  • Large Object support

  • Index/Unique support

  • Module Framework to load advanced functionality on demand

  • Table information interface

  • RDBMS management methods (creating, dropping, altering)

  • RDBMS independent xml based schema definition management

  • Altering of a DB from a changed xml schema

  • Reverse engineering of xml schemas from an existing DB (currently only MySQL)

  • Full integration into the PEAR Framework

  • PHPDoc API documentation

Currently supported RDBMS:

  • MySQL

  • PostGreSQL

  • Oracle

  • Frontbase

  • Querysim

  • Interbase/Firebird

  • MSSQL

  • SQLite

Other soon to follow.

A.6.18. mdbtools

Repository: PECL - License: LGPL - By Hartmut Holzgraefe (lead)

MDB data file access library

A.6.18.1 Description

mdbtools provides read access to MDB data files as used by Microsoft Access and its underlying JetEngine.

It is based on libmdb from the mdbtools package available at http://mdbtools.sourceforge.net/

A.6.19. MDB_QueryTool

Repository: PEAR - License: PHP - By Lorenzo Alberton (lead)

An OO-interface for easily retreiving and modifying data in a DB.

A.6.19.1 Description

This package is an OO-abstraction to the SQL-Query language, it provides methods such as setWhere, setOrder, setGroup, setJoin, etc. to easily build queries. It also provides an easy to learn interface that interacts nicely with HTML-forms using arrays that contain the column data, that shall be updated/added in a DB. This package bases on an SQL-Builder which lets you easily build SQL-Statements and execute them. NB: this is just a MDB porting from the original DB_QueryTool written by Wolfram Kriesing and Paolo Panto (vision:produktion, wk@visionp.de).

A.6.20. oci8

Repository: PECL - License: PHP - By Antony Dovgal (developer) - Stig Bakken (developer) - Thies C. Arntzen (developer) - Andy Sautins (developer) - David Benson (developer) - Maxim Maletsky (developer) - Harald Radi (developer)

Oracle Call Interface(OCI) wrapper

A.6.20.1 Description

This module allows you to access Oracle9/8/7 database.

It wraps the Oracle Call Interface (OCI).

A.6.21. odbtp

Repository: - License: LGPL -

ODBTP client functions

A.6.21.1 Description

This extension provides a set of ODBTP, Open Database Transport Protocol, client functions. ODBTP allows any platform to remotely access Win32-based databases. Linux and UNIX clients can use this extension to access Win32 databases like MS SQL Server, MS Access and Visual FoxPro.

A.6.22. Paradox

Repository: - License: PHP License -

An extension to read Paradox files

A.6.22.1 Description

Paradox is an extension to read Paradox .DB and .PX files. It has experimental write support which should be handled with care.

A.6.23. SQLite

Repository: PECL - License: PHP - By Wez Furlong (lead) - Tal Peer (developer) - Marcus Börger (lead) - Ilia Alshanetsky (developer)

SQLite database bindings

A.6.23.1 Description

SQLite is a C library that implements an embeddable SQL database engine. Programs that link with the SQLite library can have SQL database access without running a separate RDBMS process. This extension allows you to access SQLite databases from within PHP. Windows binary available from: http://snaps.php.net/win32/PECL_STABLE/php_sqlite.dll

A.6.24. SQL_Parser

Repository: PEAR - License: LGPL - By Brent Cook (lead)

An SQL parser

A.6.24.1 Description

This class is primarily an SQL parser, written with influences from a variety of sources (mSQL, CPAN's SQL-Statement, mySQL). It also includes a tokenizer (lexer) class and a reimplementation of the ctype extension in PHP.

    Team LiB
    Previous Section Next Section