Re: XML_Indexing and DB_Dataobject
| From: | Justin Patrin | Date: | Tue, 05 Oct 2004 22:06:44 +0000 |
| Subject: | Re: XML_Indexing and DB_Dataobject | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-33664@lists.php.net to get a copy of this message | ||
On Tue, 05 Oct 2004 23:32:33 +0200, Olivier Guilyardi <ml@xung.org> wrote:
> Hi,
>
> I've posted a proposal for XML_Indexing, a new package for indexing
> local XML files, so that one can fastly seek and retrieve a specific
> portion of these files.
>
> One of my main ideas behind this package is related to dataobjects,
> which offer _real_ database abstraction : dataobjects indeed are SQL-free.
>
> This gave me the idea of using an XML container instead of a SQL server
> as the dataobjet underlying layer. When one calls $do->find(), or
> $do->orderBy(), there is no need to know if it issues SQL or not.
> A container of any kind, be it an XML or CSV file, is required, that's it.
>
> In this regard XML_Indexing is, to me, a very important step :
> it makes XML native databases possible (RDB). No need to load the entire XML
> file anymore, thus sacrifying speed. As SQL databases, XML files now
> gets index-aware.
>
> Some may argue that, in PHP5, SQLite already provides a handy and
> optimized way to store data locally. That's true, but the data is stored
> in binary files, and for some, as me, it is a much more elegant and
> portable solution to produce and read XML. Of course, SQLite makes it
> easy to port an sql-server based application to a local-storage based
> one, by letting SQL statements in place, but that is another question.
>
> What do you think about XML native databases management with PHP ?
> Do you believe XML_Indexing integration with DB_Dataobject is a good idea ?
>
Well, you could create a Data Driver for DB_DataObject, but that seems
not too useful to me. It would create more complexity without adding
too much usefulness. Can you think of many other data backends?
IMHO if you want to store data in XML, it's much more useful to make a
DB driver which stores its data in XML. It can even just support a
subset of SQL if you want. This way, it takes no change to
DB_DataObject and other DB-using projects could make use of it with
minimal changes.
Of course, this would require SQL parsing....but if you only do a
subset, you should be fine. There's also SQL_Parser:
http://pear.php.net/package/SQL_Parser. This
also may make XML_Indexer
less useful, but it seems like the right place to stick this
functionality to me.
--
paperCrane --Justin Patrin--