Updated README.
[dbsrgits/SQL-Translator.git] / README
1                       SQL::Translator README
2
3 The SQLFairy project began with the idea of simplifying the task of
4 converting one database create syntax to another through the use of
5 Parsers (which understand the source format) and Producers (which
6 understand the destination format).  The idea is that any Parser can be
7 used with any Producer in the conversion process, so, if you wanted
8 Postgres-to-Oracle, you would use the Postgres parser and the Oracle
9 producer.  The project has since grown to include parsing structured data
10 files like Excel spreadsheets and delimited text files and the
11 production of various documentation aids, such as images, graphs, POD,
12 and HTML descriptions of the schema, as well as automatic code
13 generators through the use of Class::DBI.  Presently only the definition
14 parts of SQL are handled (CREATE, ALTER), not the manipulation of data
15 (INSERT, UPDATE, DELETE).
16
17 As of version 0.02, parsers exist for the following:
18
19     Excel
20     MySQL
21     Oracle
22     PostgreSQL
23     Sybase
24     xSV (arbitrarily delimited text files)
25
26 And the following producers exist:
27
28     ClassDBI: Class::DBI classes
29     Diagram: quasi-ER diagrams using libgd
30     GraphViz: ER diagrams using GraphViz
31     HTML: HTML documentation of schema
32     MySQL: MySQL-specific schema
33     Oracle: Oracle-specific schema
34     POD: Plain Old Documenation of schema
35     PostgreSQL: PostgreSQL-specific schema
36     SQLite: SQLite-specific schema
37     Sybase: Sybase-specific schema
38     XML: structure of the schema described in XML
39
40 You can, of course, define your own parsers or producers and pair them
41 with existing parsers or producers as long as they adhere to the API
42 of the SQL::Translator::Schema object.
43
44 Included in this distribution are a few scripts designed to be user
45 interfaces for the actual SQL::Translator modules.  In the "bin"
46 directory, you will find:
47
48 *   sqlt-diagram.pl
49 *   sqlt-graph.pl
50 *   sql_translator.cgi
51 *   sql_translator.pl
52
53 All scripts ending in ".pl" are meant to be run from the command line
54 with various switches to control the input and output of the scripts,
55 while the ".cgi" script is a web-form frontend.  The script you'll
56 probably find most useful is the "sql_translator.pl" script which is
57 meant to be the main interface for translating from text-to-text.  The
58 graphic producers, however, have many extra switches, so there are
59 scripts specific for each of the the GraphViz an ER-diagram producers.
60 All scripts start with "sql" so it will be easier to identify them on
61 your system.  All the "*.pl" scripts will be installed in the normal
62 installation process, but you'll have to put the CGI script into your
63 web CGI directory to use it.
64
65 If you're more interested in using the SQL::Translator modules
66 directly, then you might be more interested to examine some of the
67 test scripts in the "t" directory.  While the test suite isn't
68 currently as thorough as it should be, you will definitely get the
69 idea of how to parse a file and manipulate the SQL::Translator::Schema
70 objects.
71
72 INSTALLATION
73
74 The regular method:
75
76     $ perl Makefile.PL
77     $ make
78     $ make test
79     $ su -
80     # make install
81
82 AUTHORS
83
84 Ken Y. Clark, <kclark@cpan.org>, 
85 darren chamberlain <darren@cpan.org>,
86 Chris Mungall <cjm@fruitfly.org>, 
87 Allen Day <allenday@users.sourceforge.net>, 
88 Sam Angiuoli <angiuoli@users.sourceforge.net>, 
89 Ying Zhang <zyolive@yahoo.com>, 
90 Mike Mellilo <mmelillo@users.sourceforge.net>.
91
92 COPYRIGHT
93
94 This program is free software; you can redistribute it and/or modify it
95 under the terms of the GNU General Public License as published by the
96 Free Software Foundation; version 2.
97
98 This program is distributed in the hope that it will be useful, but
99 WITHOUT ANY WARRANTY; without even the implied warranty of
100 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
101 Public License for more details.
102
103 You should have received a copy of the GNU General Public License along
104 with this program; if not, write to the Free Software Foundation, Inc.,
105 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
106
107 BUGS
108
109 Please use http://rt.cpan.org/ for reporting bugs.