Proposal for "Sqlite_Tools"

» Metadata » Status
  • Category: Database
  • Proposer: David Costa 
  • License: PHP
» Description

Sqlite_Tools

Intro

Sqlite is a lightweight embedded database library. It is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine and is included by default with PHP 5.

Sqlite_Tools is an object oriented interface to effectively manage and backup Sqlite databases.

Why SQLite Tools

The stregth of Sqlite and its superb portability might also be seen as a weakness. Because each database is
self contained in a file we do have a single point of entry and a single point of failure.

Client-Server relational databases implements a number of build-in features to make the db corruption a remote occurance.

Whilst Sqlite does offer some similar functionality (e.g. synchronous value), there are no PHP functions in this directions and there is little knowledge on how to successfully maintain and backup multiple database insuring the integrity of the initial and cloned database.

Sqlite_Tools functions

Sqlite_Tools functionality can be summarized in two different branches:

Database Manipulation and Maintenance
checkIntegrity : checks the integrity of one or more databases see the live example
cacheSize : checks or reset the default cache size in one ore more databases see the live example
Sync: checks or rest the synchronous value in one more more databases see the example
dbFileInfo: Fetch all the available information in one more more databases filessee the example
copySafe: performs a safe copy for a database, checks integrity on the cloned database

and others, each of the function is well commented so you should be able to understand its purpose.

Database backup or remote live replication

ftpBackup : backups one or more databases via ftpsee the example
localRsync: Rsync a database path locally, requires Rsync lib
remoteRsync: launch a local Rsync deamon for the purpose of remote synchronization (experimental function)
XMLDump : creates an XML dump of one or more databases see the example

Sqlite_Tools Output and Usage

Because Sqlite_Tools is a library its output for mostly of the function is basically raw and can be used in connection with the logs function which keeps each of the operations (e.g. database opened, database integrity check, database backup on ftp performed) output in a local sqlite logs database.

On the source link below you can see a number of usage examples.

Updated 11 July 2004
Removed some of the constants
as suggested by Hans

» Dependencies » Links
» Timeline » Changelog
  • First Draft: 2004-07-03
  • Proposal: 2004-07-03
  • Call for Votes: 2004-07-14