Looking for a FlatFile database driver for PHP

This is a discussion on Looking for a FlatFile database driver for PHP within the PHP Language forums, part of the PHP Programming Forums category; Hi group, Introduction: I need access to database-functionality for a project. The problem is I cannot be sure that ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-10-2003
Erwin Moller
 
Posts: n/a
Default Looking for a FlatFile database driver for PHP

Hi group,

Introduction:
I need access to database-functionality for a project.
The problem is I cannot be sure that a database exists on all places where I
need to run the code.
I can only expect PHP to be installed on all the intranets where the
software runs.

So to mimic some databasefunctionality I first thought to use plain files to
store the data. Or maybe write away my datastructures serialized.
That is a bit cumbersome, but can be done.
Things would be nicer for if I could use real SQL.

My question:
So I wondered if there is some way for me to use real SQL-statements on a
flatfile. If that is possible I would really safe me a lot of trouble.
In that way I can use real SQL and do not expect my customers to have to
install mySQL or Postgres.

I hope I make sense. :-)

TIA,
Erwin Moller
Reply With Quote
  #2 (permalink)  
Old 12-10-2003
Justin Koivisto
 
Posts: n/a
Default Re: Looking for a FlatFile database driver for PHP

Erwin Moller wrote:

> I need access to database-functionality for a project.
> The problem is I cannot be sure that a database exists on all places where I
> need to run the code.
> I can only expect PHP to be installed on all the intranets where the
> software runs.
>
> So I wondered if there is some way for me to use real SQL-statements on a
> flatfile. If that is possible I would really safe me a lot of trouble.
> In that way I can use real SQL and do not expect my customers to have to
> install mySQL or Postgres.


Have a look at this:
http://sourceforge.net/projects/fsql

Now sure how well it works since I've never tried. The README file has
some documentation about what is supported and how to use it.

--
Justin Koivisto - spam@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

Reply With Quote
  #3 (permalink)  
Old 12-10-2003
Phil Roberts
 
Posts: n/a
Default Re: Looking for a FlatFile database driver for PHP

With total disregard for any kind of safety measures Erwin Moller
<since_humans_read_this_I_am_spammed_too_much@spam yourself.com>
leapt forth and uttered:

> Hi group,
>
> Introduction:
> I need access to database-functionality for a project.
> The problem is I cannot be sure that a database exists on all
> places where I need to run the code.
> I can only expect PHP to be installed on all the intranets where
> the software runs.
>
> So to mimic some databasefunctionality I first thought to use
> plain files to store the data. Or maybe write away my
> datastructures serialized. That is a bit cumbersome, but can be
> done. Things would be nicer for if I could use real SQL.
>
> My question:
> So I wondered if there is some way for me to use real
> SQL-statements on a flatfile. If that is possible I would
> really safe me a lot of trouble. In that way I can use real SQL
> and do not expect my customers to have to install mySQL or
> Postgres.
>
> I hope I make sense. :-)
>
> TIA,
> Erwin Moller


Have you looked into PEAR::DBA @ http://pear.php.com/DBA ?

It's a file-based database system that uses either the Berkeley DB
driver extention (if available) or a flatfile-based alternative.
Berkeley DB's are a very stable form of file storage, read the
blurb for yourself at http://www.sleepycat.com/

Also there is PEAR::DBA_Relational
(http://pear.php.net/DBA_Relational) which enables you to use the
above system in a relational database fashion. Complete with stuff
like query joins and other handy things.

--
There is no signature.....
Reply With Quote
  #4 (permalink)  
Old 12-11-2003
R. Rajesh Jeba Anbiah
 
Posts: n/a
Default Re: Looking for a FlatFile database driver for PHP

Erwin Moller <since_humans_read_this_I_am_spammed_too_much@spam yourself.com> wrote in message news:<3fd73bd3$0$213$e4fe514c@news.xs4all.nl>...

<snip>

> My question:
> So I wondered if there is some way for me to use real SQL-statements on a
> flatfile. If that is possible I would really safe me a lot of trouble.
> In that way I can use real SQL and do not expect my customers to have to
> install mySQL or Postgres.


1. "Text DB" http://www.c-worker.ch/txtdbapi/index_eng.php
2. SQLite http://in.php.net/sqlite (if you're provided)

--
"There are two kinds of people, those who do the work and those who
take the credit. Try to be in the first group; there is less
competition there." -- Indira Gandhi
Email: rrjanbiah-at-Y!com
Reply With Quote
  #5 (permalink)  
Old 12-11-2003
Manuel Lemos
 
Posts: n/a
Default Re: Looking for a FlatFile database driver for PHP

Hello,

> My question:
> So I wondered if there is some way for me to use real SQL-statements on a
> flatfile. If that is possible I would really safe me a lot of trouble.
> In that way I can use real SQL and do not expect my customers to have to
> install mySQL or Postgres.


You may want to take a look at this solution written in pure PHP as you
want. It provides support to execute the usual SQL queries SELECT,
UPDATE, INSERT and DELETE, as were CREATE and DROP tables. It is
probably not very fast but is what you asked for.

Class: Perfect Database File
http://www.phpclasses.org/pdbf

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

Reply With Quote
  #6 (permalink)  
Old 12-15-2003
Erwin Moller
 
Posts: n/a
Default Re: Looking for a FlatFile database driver for PHP

Hi all,

Thanks a lot for all your suggestions!
I was afraid to get negative responses or none at all (The worst).
:-)

I am looking into it right now.
Thanks!

Regards,
Erwin Moller
Reply With Quote
  #7 (permalink)  
Old 12-17-2003
Erwin Moller
 
Posts: n/a
Default Re: Looking for a FlatFile database driver for PHP

R. Rajesh Jeba Anbiah wrote:

> Erwin Moller
> <snip>
>
>> My question:
>> So I wondered if there is some way for me to use real SQL-statements on a
>> flatfile. If that is possible I would really safe me a lot of trouble.
>> In that way I can use real SQL and do not expect my customers to have to
>> install mySQL or Postgres.

>
> 1. "Text DB" http://www.c-worker.ch/txtdbapi/index_eng.php
> 2. SQLite http://in.php.net/sqlite (if you're provided)
>



Thanks Rajesh,

I found number 1 extremely usefull and userfriendly.

"Text DB" http://www.c-worker.ch/txtdbapi/index_eng.php

Regards,
Erwin
Reply With Quote
  #8 (permalink)  
Old 12-18-2004
FarazAli
 
Posts: n/a
Default Re: Looking for a FlatFile database driver for PHP

Since "Text DB" is extremely slow, I would reccomend taking a look at
txtSQL (http://txtsql.sf.net) support for a subset of SQL is on the
way. The plus is that it's much quicker than Text DB
(http://chibiguy.dotgeek.org/benchmark.htm)

Reply With Quote
  #9 (permalink)  
Old 12-19-2004
R. Rajesh Jeba Anbiah
 
Posts: n/a
Default Re: Looking for a FlatFile database driver for PHP

FarazAli wrote:
> Since "Text DB" is extremely slow, I would reccomend taking a look at
> txtSQL (http://txtsql.sf.net) support for a subset of SQL is on the
> way. The plus is that it's much quicker than Text DB
> (http://chibiguy.dotgeek.org/benchmark.htm)


Nice work. But, looks like that we need to go for another
wrapper--incase if we did code with direct queries
<http://txtsql.sourceforge.net/content/docs/index.php?f=29>

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:08 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0