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