Re: PDO Ground Rules

From: Date: Tue, 15 Feb 2005 15:27:12 +0000
Subject: Re: PDO Ground Rules
References: 1 2 3 4  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-2003@lists.php.net to get a copy of this message
On Tue, 15 Feb 2005 10:30:32 +0100, Lukas Smith <lsmith@php.net> wrote: > Lester Caine wrote: > > > But for PDO to replace an existing driver it needs hooks for things > > other than just the data connection. We have established (as I > > understand it) that it will not provide generic facilities such as 'SQL > > mangling' so that SQL specific to the server engine will be required to > > access such information as list of tables, schemas, databases, etc., but > > some generic means of accessing an engines services interface will be > > necessary before the need to run an existing native driver in parallel > > with PDO can be removed? Backup/restore, starting/stopping, user > > management - thing on some engines that are not managed via SQL at all, > > or require connections to the database to be closed before they can be > > actioned. THAT is what I am having difficulty 'picturing' in the way > > that PDO is currently structured. I expect to be able to access the > > database server without necessarily opening a database. That may be > > possible by providing simply a driver and server name in the dsn, but in > > my mind I need something more than get and setAttribute to control things. > > In reality very few applications require all the above mentioned > features. Exactly my thoughts. It doesn't make sense to clutter the PDO interface with database administration functions like stop/start/backup/restore when 90% of the applications would never use them. I would suggest letting PDO pursue its goal of being a nice clean 'data access' interface for databases. Someone (hmm, Lester, you seem motivated) should start a complementary PHP Database Administration (PDA) interface project to provide a common interface for database administration tasks -- which, as you pointed out, often require a completely different set of authorities, connections to different objects, etc. than simple data access requires. Then, for those applications that need to combine both data access and database administration tasks, you could just create a PDO object and a PDA object and manipulate them as required. Much easier for me to say than to actually do, of course :) Dan

« previous php.pecl.dev (#2003) next »