DBD::File::Roadmap − Planned Enhancements for DBD::File and pure Perl DBD’s

Jens Rehsack − May 2010


This document gives a high level overview of the future of the DBD::File DBI driver and groundwork for pure Perl DBI drivers.

The planned enhancements cover features, testing, performance, reliability, extensibility and more.


There are some features missing we would like to add, but there is no time plan:

The newly implemented internal common table meta storage area would allow us to implement LOCK TABLE support based on file system "flock ()" support.

Transaction support

While DBD::AnyData recommends explicitly committing by importing and exporting tables, DBD::File might be enhanced in a future version to allow transparent transactions using the temporary tables of SQL::Statement as shadow (dirty) tables.

Transaction support will heavily rely on lock table support.

Data Dictionary Persistence

SQL::Statement provides dictionary information when a " CREATE TABLE ..." statement is executed. This dictionary is preserved for some statement handle attribute fetches (as "NULLABLE" or "PRECISION").

It is planned to extend DBD::File to support data dictionaries to work on the tables in it. It is not planned to support one table in different dictionaries, but you can have several dictionaries in one directory.

SQL Engine selecting on connect

Currently the SQL engine selected is chosen during the loading of the module DBI::SQL::Nano. Ideally end users should be able to select the engine used in "DBI−>connect ()" with a special DBD::File attribute.

Other points of view to the planned features (and more features for the SQL::Statement engine) are shown in SQL::Statement::Roadmap.

DBD::File and the dependent DBD::DBM requires a lot more automated tests covering API stability and compatibility with optional modules like SQL::Statement.

Several arguments for support of features like indexes on columns and cursors are made for DBD::CSV (which is a DBD::File based driver, too). Similar arguments could be made for DBD::DBM , DBD::AnyData, DBD::RAM or DBD::PO etc.

To improve the performance of the underlying SQL engines, a clean reimplementation seems to be required. Currently both engines are prematurely optimized and therefore it is not trivial to provide further optimization without the risk of breaking existing features.

Join the DBI developers IRC channel at <irc://irc.perl.org/dbi> to participate or post to the DBI Developers Mailing List.

DBD::File currently lacks the following points:
duplicate table names

It is currently possible to access a table quoted with a relative path (a) and additionally using an absolute path (b). If (a) and (b) are the same file that is not recognized (except for flock protection handled by the Operating System) and two independent tables are handled.

invalid table names

The current implementation does not prevent someone choosing a directory name as a physical file name for the table to open.

I (Jens Rehsack) have some (partially for example only) DBD ’s in mind:

Derive DBD::Sys from a common code base shared with DBD::File which handles all the emulation DBI needs (as getinfo, SQL engine handling, ...)


Provide a DBD::File derived to work with fixed table definitions through the file system to demonstrate how DBI / Pure Perl DBDs could handle databases with hierarchical structures.


Provide a DBI driver which is able to manage multiple connections to other Databases (as DBD::Multiplex), but allow them to point to different data sources and allow joins between the tables of them:

  # Example
  # Let table 'lsof' being a table in DBD::Sys giving a list of open files using lsof utility
  # Let table 'dir' being a atable from DBD::Dir
  $sth = $dbh−>prepare( "select * from dir,lsof where path='/documents' and dir.entry = lsof.filename" )
  $sth−>execute(); # gives all open files in '/documents'
  # Let table 'filesys' a DBD::Sys table of known file systems on current host
  # Let table 'applications' a table of your Configuration Management Database
  #  where current applications (relocatable, with mountpoints for filesystems)
  #  are stored
  $sth = dbh−>prepare( "select * from applications,filesys where " .
                       "application.mountpoint = filesys.mountpoint and ".
                       "filesys.mounted is true" );
  $sth−>execute(); # gives all currently mounted applications on this host


Our priorities are focussed on current issues. Initially many new test cases for DBD::File and DBD::DBM should be added to the DBI test suite. After that some additional documentation on how to use the DBD::File API will be provided.

Any additional priorities will come later and can be modified by (paying) users.


See <http://dbi.perl.org/contributing> for how you can help.

If your company has benefited from DBI , please consider if it could make a donation to The Perl Foundation " DBI Development" fund at <http://dbi.perl.org/donate> to secure future development.

Alternatively, if your company would benefit from a specific new DBI feature, please consider sponsoring it’s development through the options listed in the section "Commercial Support from the Author" on <http://dbi.perl.org/support/>.

Using such targeted financing allows you to contribute to DBI development and rapidly get something specific and directly valuable to you in return.

My company also offers annual support contracts for the DBI , which provide another way to support the DBI and get something specific in return. Contact me for details.

Thank you.


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.

Free Software

Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.

Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.

Free Books

The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.

Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.

Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.