Gallery2:SoC-SQLite Gallery 2 SQLite Backend - Gallery Codex
Personal tools

Gallery2:SoC-SQLite Gallery 2 SQLite Backend

From Gallery Codex

This page details the progress of Brian Kirchoff in the Google Summer of Code 2007 project to add SQLite Database support to Gallery. Currently the project supports a range of databases including MySQL, Postgres, Oracle, MSSQL, and DB2. However the requirement of running an additional server for one of these databases still limits some users from installing Gallery 2 due to hosting restrictions or performance issues. SQLite is a unique database with an extrememly small code footprint (<250KB/s) that stores it data in a single file. PHP5 adds support for SQLite v3 by default with new PDO database framework. The goal of this project is to use this support to allow the installation of Gallery on servers without a standalone database. Below is a list of the tasks that will need to be accomplished and their status towards this goal:

Task Requirements/Progress

  • ADODB Database Library -- Working and tested
    • PDO class -- From ADODB project
    • PDO-SQLite specific class -- ** Working
  • SQLiteStorage -- ** Working
    • getFunctionSql -- ** Working
    • blob support -- ** Working
  • SQL Generator generate-sql.php -- **
    • correct ColumnDefinitionMap ** Working
    • remove columns without ALTER TABLE ** Working (Could be improved in future)
    • index syntax ** Working
  • Gallery Installer -- Working
    • SQLite in list ** Done
    • serialization of PDO connection ** Done
    • disable username/password/host fields (usability) ** Done

SQLite support is fully working at this point. Code is in the SVN trunk and should be included in Gallery 2.3


I am a 20 year old student from Rochester, NY. Currently I attend Rochester Institute of Technology where I study Information Technology with a concentration in Database and Interactive Multimedia. Currently I work at a small company in Rochester doing web development using PHP/MySQL. I am a Zend Certified PHP5 Engineer and having been using PHP for over 5 years. Between my work and education experience I have got to experiment with many relational database systems including Oracle, MySQL, and MSSQL.

I am a fan of Gallery having used Gallery 1.x in the past. I’m always interested in experimenting with new database technologies and SQLite is an interesting database that has the potential to bring relational databases and Gallery to shared hosting accounts and other servers that don’t have a large RDBMS available. I’ve always been interested in open source and GSoC sponsorship would give me the time to help with this great project.

There is more information about me at