A Path Less Taken

Breaking with convention in a very conventional fashion. Powered by WordPress

"What would you attempt to do if you knew you could not fail?"
Dr. Robert Schuller

Monday, October 19, 2009

Category: PHP Development Tags: , Author: JJ 0 Comments

I’m a quiet advocate that Relational Database Management Systems (RDBMS) are overkill for some applications. A great example of this is small, web based utility programs that we write for ourselves and for others. Assume you need a small single user program with a limited amount of data. You can use a web server like lighttpd and a script engine like PHP to create a highly portable solution that will cross multiple OS’s. This is far from the only approach, nor is it necessarily the best, but it is viable, particularly for a developer whose core strength is in web based development and UI design.

The problem is you have to write your own data handling classes complete with IO. Enter a small collection of text based database scripts written in PHP. Their intent is to provide basic tools to treat one or more text files as if they were a RDBMS. They don’t support the full SQL standard, nor do they provide ACID transactions, but for a small one off job they might just be the trick you are looking for. Here is a short list of some I noted on the web.

  • PHP Text DB API – A mature implementation of a text based database in PHP. The English manual can be found here.
  • TextDB – Also a mature solution. Built by the UPD team as the DBMS for their application. The Ultimate PHP Board (UPD) is a free flat file bulletin board powered by TextDB.
  • mUps – A mUlti-Purpose text database system developed by Andreas Schamanek. It appears to be in an Alpha stage of development per the web site.
  • txtSQL – A text based database developed by Faraz Ali and based on a Perl script of the same name. There are a number of posts in the forum from 2007 indicating that version 4 was in development, but the project appears to be dead or suspended. I sent a note to the author to confirm and I’ll update this post if I hear back from him.

If any of my readers (yes, all 3 of you) is aware of other text based databases that are worth noting please post a comment here as I’d love to check them out. I should point out that I have not used any of these products. If you have used one please post a comment and let me know what you thought of it.

Peace

No comments found. Please enter a comment if you have a question or contribution.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">