XML to DDL is a set of Python programs that converts an XML representation of a database into a set of SQL or DDL (Data Definition Language) commands. In addition, it can examine the difference between two XML files and output a sequence of SQL statements (normally ALTER statements) to bring one database up-to-date with the XML schema. You can also download the XML schema directly from the database. Finally, there's a tool to convert your schema into HTML for documentation purposes. XML to DDL currently supports the most recent versions of PostgreSQL, MySQL, Oracle, and Firebird databases.
source...