Upped version numbers, cleaned up code, fixed my name.
[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
c4bf7f53 10XML), creating documentation (HTML and POD), and more. We also
11have the ability to talk directly to a database through DBI to
a9dcf25b 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
ba506e52 21As of version 0.10, parsers exist for the following:
c047df29 22
68186ea5 23 Databases:
ba506e52 24 Access
25 DB2
26 DBI-DB2
27 DBI-MySQL
28 DBI-Oracle
29 DBI-PostgreSQL
30 DBI-SQLServer
31 DBI-SQLite
32 DBI-Sybase
68186ea5 33 MySQL
34 Oracle
35 PostgreSQL
ba506e52 36 SQLServer
a9dcf25b 37 SQLite
ba506e52 38 Storable
6f20f0e3 39 Sybase
a9dcf25b 40
68186ea5 41 Other:
a9dcf25b 42 xSV : arbitrarily delimited text files
43 Excel : Microsoft Excel spreadsheets
44 XML-SQLFairy : SQLFairy's XML format
6a86d615 45 YAML/Storable: Serialized schema objects
c047df29 46
47And the following producers exist:
48
68186ea5 49 Databases:
ba506e52 50 DB2
68186ea5 51 MySQL
52 Oracle
53 PostgreSQL
ba506e52 54 SQLServer
68186ea5 55 SQLite
ba506e52 56 Storable
68186ea5 57 Sybase
68186ea5 58
59 Code Generators:
a9dcf25b 60 ClassDBI : Class::DBI classes
ba506e52 61 Dumper : create a "mysqldump"-like dumper for database
62 DBIx-Class : see the DBIx::Class distribution
68186ea5 63
64 Documentation:
a9dcf25b 65 Diagram : quasi-ER diagrams using libgd
66 GraphViz : ER diagrams using GraphViz
67 HTML : HTML documentation of schema
68 POD : Plain Old Documenation of schema
ba506e52 69 Latex : self-explanatory
70 DiaUml : ditto
a9dcf25b 71
72 Serialization:
73 Storable : using Perl's Storable module
74 YAML : YAML format
75 XML-SQLFairy : structure of the schema described in SQLFairy's XML
68186ea5 76
77 Other:
a9dcf25b 78 TTSchema : to any text format via Template Toolkit
c047df29 79
c047df29 80Included in this distribution are a few scripts designed to be user
81interfaces for the actual SQL::Translator modules. In the "bin"
82directory, you will find:
83
ba506e52 84* sqlt : command-line interface for text-to-text translations
85* sqlt-diagram : interface to Diagram producer
86* sqlt-diff : diff two schemas to generate schema mutation file
87* sqlt-graph : interface to GraphViz producer
88* sqlt-dumper : create a data dumper script from a schema
89* sqlt.cgi : CGI interface for all SQLFairy functions
67bb95f1 90
91All scripts not ending in ".cgi" are meant to be run from the command
92line with various switches to control the input and output of the
93scripts, while the ".cgi" script is a web-form frontend. The script
94you'll probably find most useful is "sqlt" which is meant to be the
95main interface for translating from text-to-text. The graphic
96producers, however, have many extra switches, so there are scripts
97specific for each of the the GraphViz and ER-diagram producers. All
98scripts start with "sqlt" so it will be easier to identify them on
99your system. All the non-CGI scripts will be installed in a system
100path when you "make install," but you'll have to manually place the
101CGI script into your web CGI directory to use it.
c047df29 102
103If you're more interested in using the SQL::Translator modules
104directly, then you might be more interested to examine some of the
68186ea5 105test scripts in the "t" directory. The test suite is relatively
106thorough and should give you an idea of how to parse a file and
107manipulate the SQL::Translator::Schema objects.
46d3d648 108
6e220350 109INSTALLATION
110
ba506e52 111 $ perl Makefile.PL
112 $ make && make test
113 $ sudo make install
c4bf7f53 114
115MANUAL
116
117To read the manual:
118
119 $ perldoc SQL::Translator::Manual
6e220350 120
46d3d648 121COPYRIGHT
46d3d648 122
c047df29 123This program is free software; you can redistribute it and/or modify it
124under the terms of the GNU General Public License as published by the
125Free Software Foundation; version 2.
46d3d648 126
c047df29 127This program is distributed in the hope that it will be useful, but
128WITHOUT ANY WARRANTY; without even the implied warranty of
129MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
130Public License for more details.
46d3d648 131
c047df29 132You should have received a copy of the GNU General Public License along
133with this program; if not, write to the Free Software Foundation, Inc.,
13459 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2e1b1775 135
c047df29 136BUGS
46d3d648 137
c047df29 138Please use http://rt.cpan.org/ for reporting bugs.
e784dbe4 139
4cdd7bf1 140PRAISE
141
142If you find this module useful, please use
143"http://cpanratings.perl.org/rate/?distribution=SQL-Translator" to rate it.
144
e784dbe4 145SEE ALSO
146
147Check out the SQLFairy homepage at Sourceforge for more information,
148mailing lists, etc.:
149
150 http://sqlfairy.sourceforge.net/
a9dcf25b 151
152AUTHORS
153
c734e9e6 154See the included AUTHORS file.