PHP Classes

pDB: File based database SQL engine in pure PHP

Recommend this page to a friend!
  Info   View files View files (9)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 49%Total: 1,303 All time: 2,959 This week: 113Up
Version License Categories
pdb 1.0.0GNU Lesser Genera...Databases, Files and Folders


pDB is a collection of PHP classes that implement a file based embeddable SQL database engine.

It was written in pure PHP and does not require any special extension or external resource. So, it can be distributed with any plain PHP application.

It works by storing the database tables in files that contain arrays serialized by PHP to store the data of the rows and columns of the tables. The database table files can be moved between different environments and operating systems.

It provides a SQL 92 compliant interface to execute queries like with any SQL database engine.

With small databases it can be faster than MySQL or PostgreSQL. It does not impose the overhead of establishing local socket or TCP/IP connections.

Picture of Benny Zaminga
Name: Benny Zaminga <contact>
Classes: 2 packages by
Country: Switzerland Switzerland
Age: 47
All time rank: 5458 in Switzerland Switzerland
Week rank: 398 Up6 in Switzerland Switzerland Up


pDB-0.37b - The PHP Database pDB is a collection of PHP Classes that implement an embeddable SQL DataBase engine. This project was started in 2002 as ´proof-of-concept´ by FloSax and BennyZaminga. pDB is currently developped and actively maintained by BennyZaminga <bzaminga__at__web__dot__de>. Advantages of pDB: - It's pure PHP ;) - No extension or external resource needed - Embedable/distributable into/with your own application or script - On small tables faster than MySQL/PostgreSQL - No socket and/or TCP/IP-overhead - Easy movable database Disadvantages of pDB: - It's interpreted cause written in PHP - Gets slow on big tables. Not yet optimized in any way ;( - Not fully SQL92 compliant - Not very scalable Additional Notes: - Please make sure your DB_ROOT/-folder is writable for Apache/PHP, else pDB will fail. - Feel free to change the location of your DB_ROOT, but do not forget to adjust the path in ´pDB.conf.php´. Recommended is to move your DB_ROOT outside your web-root, so DB-files can not be accessed directly by Apache. - pDB is currently alpha-quality software and is NOT recommended to be used in mission critical environments. - Please refer to for additional informations related to pDB. - This files provided here are only a small subset of the whole pDB-project. Feel free to contact me using the above email if you wanna get involved. - Documentation of the pDB-API is available for download at - Feel free to report bugs and send patches. Have Fun ;)

  Files folder image Files  
File Role Description
Files folder imageDB_ROOT (1 directory)
Accessible without login Plain text file common_queries.txt Data A few common queries needed by the HTML-Interface.
Accessible without login Plain text file index.php Example HTML-Test-Interface
Accessible without login Plain text file pDB.conf.php Data pDB's ConfigFile
Accessible without login Plain text file pDB.users.php Data pDB's UserConfig
Plain text file pDB_CORE.php Class pDB's CORE-Class
Plain text file pDB_SQL_PARSER.php Class pDB's SQL-Parser-Class
Plain text file pDB_TABLE_OBJ.php Class pDB's TableObject (´in-memory´-table or ResultSetObject)
Accessible without login Plain text file README Doc. PLEASE READ THIS

  Files folder image Files  /  DB_ROOT  
File Role Description
Files folder imagedb_00 (1 file)

  Files folder image Files  /  DB_ROOT  /  db_00  
File Role Description
  Accessible without login Plain text file .pdb Data pDB's DB-folder. (Where all databases'll reside.)

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:2,959
This week:113Up
 User Ratings  
 All time