[MDB2]: manager/xml schema
| From: | Lukas Smith | Date: | Tue, 11 May 2004 15:42:47 +0000 |
| Subject: | [MDB2]: manager/xml schema | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-29091@lists.php.net to get a copy of this message | ||
Hi,
I was just talking to Helgi on IRC about the manager/xml schema.
I noted the following things which need to be improved:
Manager:
1) being able to dump the sql instead of having to execute them
2) separating the dumping of the xml code from the dump methods.
Solutions:
1) add the ability to disable manipulation queries. this way no changes really need to be applied to the manager methods like createTable() etc. Essentially in dumping mode a custom debug handler would be set that stores all queries into a variable while having the "disable manipulation" option enabled to prevent actual execution
2) a separate class could be added similar to the parser.php which simply accepts an array structure and then writes the xml. possible one could use xml_serializer for that.
XML Schema (http://www.backendmedia.com/MDB2/docs/xml_schema_documentation.html):
1) add ability to define update and delete statements (not only insert statements)
2) add primary key support
3) add foreign key support
4) add support for auto_increment .. maybe even more RDBMS specific functionality
Solutions:
1) the syntax could be similar to how the <insert> tag works inside the <initialization> tag
2) this could borrow from the index unique syntax (http://www.backendmedia.com/MDB2/docs/xml_schema_documentation.html#233.3.4)
3) this could borrow from the sequence <on> syntax (http://www.backendmedia.com/MDB2/docs/xml_schema_documentation.html#239.3.9)
4) not so sure about how to handle this .. maybe add another tag inside the <declaration> tag for this (http://www.backendmedia.com/MDB2/docs/xml_schema_documentation.html#230.3.2)
I would appreciate comments. People wanting to help etc.
regards,
Lukas Smith
smith@backendmedia.com
_______________________________
BackendMedia
www.backendmedia.com
berlin@backendmedia.com
Linn Zwoch Smith GbR
Pariser Str. 44
D-10707 Berlin
Tel +49 30 83 22 50 00
Fax +49 30 83 22 50 07