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