X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=README;h=33e7d9a5eee5b6aaf655080b94d29e7d7daf8c35;hb=821a0fde221f5accf93e3f65efa77b5a6733cb5e;hp=8d945e35d41b873cc3a5236828e306c0df6b79ba;hpb=e784dbe4b6cc53318dda09d4f9e82c2ac626871e;p=dbsrgits%2FSQL-Translator.git diff --git a/README b/README index 8d945e3..33e7d9a 100644 --- a/README +++ b/README @@ -1,93 +1,111 @@ SQL::Translator README -The SQLFairy project began with the idea of simplifying the task of -converting one database create syntax to another through the use of -Parsers (which understand the source format) and Producers (which -understand the destination format). The idea is that any Parser can be -used with any Producer in the conversion process, so, if you wanted -Postgres-to-Oracle, you would use the Postgres parser and the Oracle -producer. The project has since grown to include parsing structured data -files like Excel spreadsheets and delimited text files and the -production of various documentation aids, such as images, graphs, POD, -and HTML descriptions of the schema, as well as automatic code -generators through the use of Class::DBI. Presently only the definition -parts of SQL are handled (CREATE, ALTER), not the manipulation of data -(INSERT, UPDATE, DELETE). - -As of version 0.02, parsers exist for the following: - - Excel - MySQL - Oracle - PostgreSQL - Sybase - xSV (arbitrarily delimited text files) +SQL::Translator is a group of Perl modules that manipulate structure +data definitions (mostly database schemas) in interesting ways, such +as converting among different dialects of CREATE syntax (e.g., +MySQL-to-Oracle), visualizations of schemas (pseudo-ER diagrams +GraphViz or GD), automatic code generation (using Class::DBI), +converting non-RDBMS files to SQL schemas (xSV text files, Excel +spreadsheets), serializing parsed schemas (via Storable, YAML and +XML), creating documentation (HTML and POD), and more. We also +have the ability to talk directly to a database through DBI to +query for the structures of several databases. + +Through the separation of the code into parsers and producers with an +object model in between, it's possible to combine any parser with any +producer, to plug in custom parsers or producers, or to manipulate the +parsed data via the built-in object model. Presently only the +definition parts of SQL are handled (CREATE, ALTER), not the +manipulation of data (INSERT, UPDATE, DELETE). + +As of version 0.06, parsers exist for the following: + + Databases: + MySQL + Oracle + PostgreSQL + SQLite + Sybase + + DBI-MySQL + DBI-PostgreSQL + DBI-SQLite + DBI-Sybase + + Other: + xSV : arbitrarily delimited text files + Excel : Microsoft Excel spreadsheets + XML-SQLFairy : SQLFairy's XML format + YAML/Storable: Serialized schema objects And the following producers exist: - ClassDBI: Class::DBI classes - Diagram: quasi-ER diagrams using libgd - GraphViz: ER diagrams using GraphViz - HTML: HTML documentation of schema - MySQL: MySQL-specific schema - Oracle: Oracle-specific schema - POD: Plain Old Documenation of schema - PostgreSQL: PostgreSQL-specific schema - SQLite: SQLite-specific schema - Sybase: Sybase-specific schema - XML: structure of the schema described in XML - -You can, of course, define your own parsers or producers and pair them -with existing parsers or producers as long as they adhere to the API -of the SQL::Translator::Schema object. + Databases: + MySQL + Oracle + PostgreSQL + SQLite + Sybase + + Code Generators: + ClassDBI : Class::DBI classes + + Documentation: + Diagram : quasi-ER diagrams using libgd + GraphViz : ER diagrams using GraphViz + HTML : HTML documentation of schema + POD : Plain Old Documenation of schema + + Serialization: + Storable : using Perl's Storable module + YAML : YAML format + XML-SQLFairy : structure of the schema described in SQLFairy's XML + + Other: + TTSchema : to any text format via Template Toolkit Included in this distribution are a few scripts designed to be user interfaces for the actual SQL::Translator modules. In the "bin" directory, you will find: -* sqlt-diagram.pl -* sqlt-graph.pl -* sql_translator.cgi -* sql_translator.pl - -All scripts ending in ".pl" are meant to be run from the command line -with various switches to control the input and output of the scripts, -while the ".cgi" script is a web-form frontend. The script you'll -probably find most useful is the "sql_translator.pl" script which is -meant to be the main interface for translating from text-to-text. The -graphic producers, however, have many extra switches, so there are -scripts specific for each of the the GraphViz and ER-diagram producers. -All scripts start with "sql" so it will be easier to identify them on -your system. All the "*.pl" scripts will be installed in the normal -installation process, but you'll have to put the CGI script into your -web CGI directory to use it. +* sqlt-diagram: interface to Diagram producer +* sqlt-diff : diff two schemas to generate schema mutation file +* sqlt-graph : interface to GraphViz producer +* sqlt-dumper : create a data dumper script from a schema +* sqlt : command-line interface for text-to-text translations +* sqlt.cgi : CGI interface for all SQLFairy functions + +All scripts not ending in ".cgi" are meant to be run from the command +line with various switches to control the input and output of the +scripts, while the ".cgi" script is a web-form frontend. The script +you'll probably find most useful is "sqlt" which is meant to be the +main interface for translating from text-to-text. The graphic +producers, however, have many extra switches, so there are scripts +specific for each of the the GraphViz and ER-diagram producers. All +scripts start with "sqlt" so it will be easier to identify them on +your system. All the non-CGI scripts will be installed in a system +path when you "make install," but you'll have to manually place the +CGI script into your web CGI directory to use it. If you're more interested in using the SQL::Translator modules directly, then you might be more interested to examine some of the -test scripts in the "t" directory. While the test suite isn't -currently as thorough as it should be, you will definitely get the -idea of how to parse a file and manipulate the SQL::Translator::Schema -objects. +test scripts in the "t" directory. The test suite is relatively +thorough and should give you an idea of how to parse a file and +manipulate the SQL::Translator::Schema objects. INSTALLATION -The regular method: + $ perl Build.PL + $ ./Build + $ ./Build test + $ su + # ./Build install - $ perl Makefile.PL - $ make - $ make test - $ su - - # make install +MANUAL -AUTHORS +To read the manual: -Ken Y. Clark, , -darren chamberlain , -Chris Mungall , -Allen Day , -Sam Angiuoli , -Ying Zhang , -Mike Mellilo . + $ perldoc SQL::Translator::Manual COPYRIGHT @@ -108,9 +126,18 @@ BUGS Please use http://rt.cpan.org/ for reporting bugs. +PRAISE + +If you find this module useful, please use +"http://cpanratings.perl.org/rate/?distribution=SQL-Translator" to rate it. + SEE ALSO Check out the SQLFairy homepage at Sourceforge for more information, mailing lists, etc.: http://sqlfairy.sourceforge.net/ + +AUTHORS + +See the include AUTHORS file.