Dries Buytaert wrote:
How can you understand the table definition proposed by Adrian (see below), if you don't know any SQL? I don't think this gets you up to speed any more quickly. Quite the contrary, you'd first have to learn SQL and then you have to figure out how this Drupal specific definition format maps onto it. Make no mistake, a Drupal-specific definition language is no excuse for not having to learn MySQL. It does add an additional step to the learning curve!
This is a very good point, and something I don't think a lot of us have considered while proposing this. But I have a question... would the introduction of db_create_table() mean removing the ability to just continue copy/pasting PHPMyAdmin dumps into db_query()? Or are we simply proposing some additional API functions for developers who wish to write portable SQL code in an easy way? It seems to me we could have the best of both worlds by not changing the current behaviour of db_query(), and instead just introducing some additional API calls for more "advanced" developers who understand MySQL but maybe don't know PostgreSQL and would like to write portable code could do so without needing to install PostgreSQL and read the whole manual there (which is another learning curve :)). -Angie