Re: Package Proposal : DB_Dump

From: Date: Mon, 02 Jun 2003 00:14:52 +0000
Subject: Re: Package Proposal : DB_Dump
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-16882@lists.php.net to get a copy of this message
Alexey Borzov wrote:
Hi! indyone :o) wrote:
Hi, My name is Ioannis and i have developed a new class which i'm calling it DB_Dump and as the name says, it has to do with the dumping the data of a database. This class needs PEAR::DB to work. The main uses of this class is to create a dump file of the tables of a database, and to execute a file with dumped data.
What is the purpose of using an abstraction layer if the only supported database is MySQL?
Somewhere in the source code, i wrote 'currently only supports mySQL' I thought that to support more databases, the best way was using PEAR::DB
To make this class possible i have used some functions from phpMyAdmin. The dumped data is also compatible with phpMyAdmin's dump files.
Isn't it simpler just to use phpMyAdmin then?
phpMyAdmin is an application for mySQL only, this class is a set of functions that someone can use to manipulate db dumps. It is difficult for someone to use phpMyAdmin's code in his pages.
I have the source here http://cassiopea.ee.teiath.gr/~indyone/dbdump/ If you have any questions, suggestions or comments, please do contact me.
I don't think you'll ever be able to support all databases that PEAR::DB supports. You are able to support MySQL just because it is *very* limited. Consider the following: to properly dump PostgreSQL database, you will need to dump: 1) Tables 2) Sequences 3) Indexes 4) Custom functions 5) Triggers 6) Custom types 7) Rules 8) Views .... N) Data And to do this correctly, you will need to resolve dependencies, or you risk having a database that will not work. And PostgreSQL isn't the hardest one, probably. I'm sure that can be done. Maybe some databases won't be supported now, but later yes. I think that this will be my objective...
Besides, dumping a multi-GB database through a web-based interface is not a very good idea, going with existing command line/GUI tools is better. I know, but you don't have access to these tools, then this will be an alternative way
-- +----------------------------------------------------------+ | Software Failure. Press left mouse button to continue. | | Guru Meditation #00000025.65045338 | +----------------------------------------------------------+

« previous php.pear.dev (#16882) next »