Added link to CPAN ratings.
[dbsrgits/SQL-Translator.git] / README
CommitLineData
c047df29 1 SQL::Translator README
2
aa301700 3SQL::Translator is a group of Perl modules that converts
5793372d 4vendor-specific SQL table definitions into other formats, such as
5other vendor-specific SQL, ER diagrams, documentation (POD and HTML),
6XML, and Class::DBI classes. The main focus of SQL::Translator is
7SQL, but parsers exist for other structured data formats, including
8Excel spreadsheets and arbitrarily delimited text files. Through the
9separation of the code into parsers and producers with an object model
10in between, it's possible to combine any parser with any producer, to
11plug in custom parsers or producers, or to manipulate the parsed data
12via the built-in object model. Presently only the definition parts of
13SQL are handled (CREATE, ALTER), not the manipulation of data (INSERT,
14UPDATE, DELETE).
c047df29 15
68186ea5 16As of version 0.03, parsers exist for the following:
c047df29 17
68186ea5 18 Databases:
19 MySQL
20 Oracle
21 PostgreSQL
22 Sybase
23
24 Other:
25 xSV : arbitrarily delimited text files
26 Excel : Microsoft Excel spreadsheets
27 SqlfXML: SQLFairy's XML format
c047df29 28
29And the following producers exist:
30
68186ea5 31 Databases:
32 MySQL
33 Oracle
34 PostgreSQL
35 SQLite
36 Sybase
37
38
39 Code Generators:
40 ClassDBI: Class::DBI classes
41
42 Documentation:
43 Diagram : quasi-ER diagrams using libgd
44 GraphViz: ER diagrams using GraphViz
45 HTML : HTML documentation of schema
46 POD : Plain Old Documenation of schema
47
48 Other:
49 SqlfXML: structure of the schema described in SQLFairy's XML
c047df29 50
c047df29 51Included in this distribution are a few scripts designed to be user
52interfaces for the actual SQL::Translator modules. In the "bin"
53directory, you will find:
54
55* sqlt-diagram.pl
56* sqlt-graph.pl
68186ea5 57* sqlt-dumper.pl
c047df29 58* sql_translator.cgi
59* sql_translator.pl
60
61All scripts ending in ".pl" are meant to be run from the command line
62with various switches to control the input and output of the scripts,
63while the ".cgi" script is a web-form frontend. The script you'll
64probably find most useful is the "sql_translator.pl" script which is
65meant to be the main interface for translating from text-to-text. The
66graphic producers, however, have many extra switches, so there are
68186ea5 67scripts specific for each of the the GraphViz and ER-diagram
68producers. All scripts start with "sql" so it will be easier to
69identify them on your system. All the "*.pl" scripts will be
70installed in the normal installation process, but you'll have to put
71the CGI script into your web CGI directory to use it.
c047df29 72
73If you're more interested in using the SQL::Translator modules
74directly, then you might be more interested to examine some of the
68186ea5 75test scripts in the "t" directory. The test suite is relatively
76thorough and should give you an idea of how to parse a file and
77manipulate the SQL::Translator::Schema objects.
46d3d648 78
6e220350 79INSTALLATION
80
81The regular method:
82
83 $ perl Makefile.PL
84 $ make
85 $ make test
86 $ su -
87 # make install
88
46d3d648 89COPYRIGHT
46d3d648 90
c047df29 91This program is free software; you can redistribute it and/or modify it
92under the terms of the GNU General Public License as published by the
93Free Software Foundation; version 2.
46d3d648 94
c047df29 95This program is distributed in the hope that it will be useful, but
96WITHOUT ANY WARRANTY; without even the implied warranty of
97MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
98Public License for more details.
46d3d648 99
c047df29 100You should have received a copy of the GNU General Public License along
101with this program; if not, write to the Free Software Foundation, Inc.,
10259 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2e1b1775 103
c047df29 104BUGS
46d3d648 105
c047df29 106Please use http://rt.cpan.org/ for reporting bugs.
e784dbe4 107
4cdd7bf1 108PRAISE
109
110If you find this module useful, please use
111"http://cpanratings.perl.org/rate/?distribution=SQL-Translator" to rate it.
112
e784dbe4 113SEE ALSO
114
115Check out the SQLFairy homepage at Sourceforge for more information,
116mailing lists, etc.:
117
118 http://sqlfairy.sourceforge.net/