|
DDLParserTool
Parse SQL-File and save as a xml catalog or serialized CatalogDescription.
IntroductionMotivation for the DDLParserToolMost ER-Modelling-Tools or UML-Tools support to generate an SQL file with table definitions. The XMI/XML format supported by these tools - if the tool you are using is supporting it - is rather complex. The proprietary format is often undocumented. We are using DeZign to model our databases. Even if you have a stylesheet to process the XMI created by the ER-tool of your choice, there are sometimes some scripts to define tables, constraints, indices, that you maintain manually. So: you always end up with one or more sql scripts that define your database. The DDLParserTool can parse SQL-scripts and create an object model (CatalogDescription) that can be stored as XML or serialized object file. This allows to process the catalog automatically, e.g.
Usagejava com.agimatec.sql.meta.script.DDLParserTool -catalog catalog.xml -dbms dbms -parse file:script-to-parse.sql Options
All scripts must belong to the same database schema catalog. ExampleParse DDL-Statements in create-tables-1.sql and create-tables-2.sql and create a file my-catalog.xml with the database catalog. java com.agimatec.sql.meta.script.DDLParserTool -catalog my-catalog.xml -dbms oracle -parse file:create-tables-1.sql -parse file:create-tables-2.sql |