For the xml2ddl project, Freshmeat.org provides a complete set of Python programs based on the GNU or GPL general public permit. In a running Python environment, this tool can work on many control systems, including Windows, Linux, and UNIX platforms,
For the xml2ddl project, Freshmeat.org provides a complete set of Python programs based on the GNU or GPL general public permit. In a running Python environment, this tool can work on many control systems, including Windows, Linux, and UNIX platforms. It can also work on the following database engines: PostgreSQL, MySQL, oracle and Firebird.
Then, the xml2ddl running user converts an XML database into a set of SQL or DDL reports. According to Scott Kirkwood, his producer and manager, "XML-to-DDL strives to make the database independent so that the same XML can be used in different databases. For example, it is very useful to quickly test the performance of various databases"
Before starting this process, the xml2ddl running user points to a mode, develops a target database, and presents the necessary DDL or SQL statements to instantiate the database. This simple XML Example is defined as a file named schemal. xml:
Desc = "List of students with their full names">
Desc = "Primary key for the table"/>
Type = "varchar" size = "80"
Desc = "The full name of the student"/>
Execute the following command line syntax to call and output the PostgresSQL information: xml2ddl-database schemal. xml. the output is as follows:
Drop table students;
Create table students (
Id integer,
Student_name varchar (80 ),
CONSTRAINT pk_students primary key (id ));
Comment on table students IS 'List of students with their full names ';
Comment on column students. id IS 'primary key for the table ';
Comment on column students. student_name IS 'the full name of The student ';
Instead of firebird, oracle or mysql can generate the same type of output results for other target databases.
The xml2ddl program can also check the differences between two different versions of XML legends and the DDL or SQL statements required by nature to update these identical changes to the relevant target database. This requires two coherent legends (let us call it the second schema2.xml and replace schemal. xml), and apply the syntax shown below:
Suppose that schema2.xml looks as follows:
Desc = "List of students">
Desc = "Primary key for the table"/>
Type = "varchar" size = "100"
Desc = "The full name of the student"/>
Type = "varchar" size = "100"
Desc = "The primary email for the student"/>
PostgresSQL generates the following DDL output:
Alter table students ALTER student_name TYPE varchar (80 );
Alter table students DROP email;
Comment on table students IS 'List of students with their full names ';
A complete example can be found on the project website of the project. They make it easy to define and govern databases using XML and related structured compilation tools, and it takes less time to translate your structured XML into a proper database metalanguage, these make these tools very useful.
The value of this is worth thinking about, and it is an amazing data integration and governance tool for those who are honored to become an application of a target database they support.