Re: comparaison between adodb/ DB /MDB | MDB2

From: Date: Mon, 01 Nov 2004 08:34:41 +0000
Subject: Re: comparaison between adodb/ DB /MDB | MDB2
References: 1 2 3 4 5 6 7 8  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15259@lists.php.net to get a copy of this message
Justin Patrin wrote:
On Sat, 30 Oct 2004 10:11:47 -0500, Justin Hendrickson <cricket@djcricket.com> wrote:
Even in it's beta state, MDB2 has become my DB abstraction layer of choice. Mr. Smith has done quite an amazing job putting this together. The use of MDB2 falls in quite well with OOP pattern based designs, including decorators for result classes and the ability to return typed data from your database. The recent addition of the MDB2_Row class and fetch_class options to the CVS are great. Of course, this could be a lot of overkill if you don't need it or just don't care, but I love it and I'd love to see more discussion and early adoption of this library. Just my 2 cents though.
If we could get a MDB(2)_DataObject out there which is compatible (or compatible enough) with DB_DataObject, we could move everyone towards it easier.
Well I have actually ported DataObject to MDB2 in a matter of a few hours a few weeks ago. It seemed to be doing fairly ok with the example I ran. However there are some things in DataObject that are very much tailored to the deficiencies of DB. Here are some general notes I made after the port. Note I am not a DataObject expert :-) - numrows is expensive in combination with unbuffered queries - use MDB2 quote method for all datatypes (only use type constants internally - they seem very useful for complex types like "email" and should probably be integrated into MDB2 itself for internal use) - use MDB2::singleton and db_index to manage MDB2 objects - use MDB2 internal debugging capabilities - can we model raiseError after MDB2's raiseError() - can we get rid of extends PEAR in MDB2 (loosing expect() error) by a custom raiseError() - insert/update/delete should return affected rows - use MDB2 manager (reverse) to read database infos - integrate xml schema format (possibly use a custom parser) - MDB2 emulates database for oracle with users - sequenceKey() seems overly complex - we need file_exists($foo, $use_include_path) !!! - how are indexes handled? how are multi column primary keys? - instead of the generator allow custom serializer and custom fields in the manager - use templates with generator? - MDB2 has float type support - MDB2 quote converts php null to sql NULL - MDB2 has all the methods needed to create tables - MDB2 has replace() support - add support to accept existing MDB2 objects regards, Lukas

« previous php.pear.general (#15259) next »