Igor is doing great work on moving forward the XML based database schema format originally developed by Manuel Lemos as part of Metabase that is used in MDB2_Schema. The idea is to add the ability to also handle UPDATE and DELETE statement next to the currently supported CREATE, DROP, ALTER and INSERT statements. This format is even supported by DBDesigner4 and the DatabaseSchema ez component. For the uninitiated if you: The idea behind this schema format is to make it possible to define a single database schema that can be used to create, alter and initialize databases in any number of RDBMS. For example currently MDB2_Schema supports MySQL, PostGreSQL, Oracle, SQLite, MS SQL Server, Interbase/Firebird.
While Igor and I were discussing things we discovered that we should also add generic support for expressions that may be composed of literals, column names and function calls. The current INSERT support should also benefit from this. Anyways there are even more things to do in the future. Specifically a better way to control the order in which DDL and DML statements are executed. I also have a bunch of other things in my head like expanding the support for CONSTRAINTs.
However for now Igor and I would appreciate some comments on the proposed changes. You may also want to have a look at the end user docs, the DTD and the XSLT. Finally if you want to see some examples check out the schema files (actually you cannot read those atm, since subversion decided to eat its database .. *sigh*) used by the WebBuilder2 schema installer.
These changes look interesting. But I suggest to first write a new parser... ;-) Maybe PEAR/XMLParser.php is a nice base? Some time ago I started writing a new parser based on the XML_Unserializer. State is 'undone devel' - I don't think that this was a good approach for large schema files. Thus I gave up..
Well this is an independent topic. We are trying to follow the current schema because its pretty good and well established. MDB2_Schema supports using different parsers, so we can decide to instead write a different parser to implement all of these nice new features. At this point we will probably also see if we can move out some of the validation into a separate class.
I just read the Application Information. As a logical consequence a SELECT (for portable export/import) would also fit well in this todo list. But I guess this is more likely something for MDB2 itself?
Uhh.. one could employ a big number of people for all these ideas.