Commit | Line | Data |
c047df29 |
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. |
46d3d648 |
71 | |
72 | AUTHORS |
c047df29 |
73 | |
74 | Ken Y. Clark, <kclark@cpan.org>, |
75 | darren chamberlain <darren@cpan.org>, |
76 | Chris Mungall <cjm@fruitfly.org>, |
77 | Allen Day <allenday@users.sourceforge.net>, |
78 | Sam Angiuoli <angiuoli@users.sourceforge.net>, |
79 | Ying Zhang <zyolive@yahoo.com>, |
80 | Mike Mellilo <mmelillo@users.sourceforge.net>. |
46d3d648 |
81 | |
82 | COPYRIGHT |
46d3d648 |
83 | |
c047df29 |
84 | This program is free software; you can redistribute it and/or modify it |
85 | under the terms of the GNU General Public License as published by the |
86 | Free Software Foundation; version 2. |
46d3d648 |
87 | |
c047df29 |
88 | This program is distributed in the hope that it will be useful, but |
89 | WITHOUT ANY WARRANTY; without even the implied warranty of |
90 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
91 | Public License for more details. |
46d3d648 |
92 | |
c047df29 |
93 | You should have received a copy of the GNU General Public License along |
94 | with this program; if not, write to the Free Software Foundation, Inc., |
95 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
2e1b1775 |
96 | |
c047df29 |
97 | BUGS |
46d3d648 |
98 | |
c047df29 |
99 | Please use http://rt.cpan.org/ for reporting bugs. |