Can you take the create table sql statements and create a complete web application? I.e. sql queries ( if there are foreign key relationships - automatically construct the inner joins ?) to insert, view, update then expose the SQL queries in the target language (my target language is C++) as an API which can be called from the Business layer, automatically construct the User interface ( for example - Web UI/ Text UI (ncurses ui) / GUI ) and retarget it for any database ? If you marked the fields in the create table statements as "search_key" can you automatically add the search facility in the sql stored procedure all the way up to the UI.
That's what my application is trying to do: Target language=C++, target UI = Web UI using wt, target database = postgres
git://github.com/neilxdsouza/codehelper.git
Currently it generates a makefile in the output directory which compiles with a Wt (witty) UI which can be run as a standalone web server. Still a work in progress - I've done it in C++ - but you need not be restricted to C++ (You should be able to emit code in any language once you have parsed the modified sql grammar which my parser already does). Sample inputs available in the inputs folder. To see the Web UI working you need wt (http://www.webtoolkit.eu/wt) and the extjs-2.1 library