Take a look at what Gossamer Threads (
http://gossamer-threads.com/scripts/mysqlman/index.htm) has done with their SQL interface - it is a generic frontend to MySQL that works very well and generates the forms based on the data types dynamicly even.
Dunno if this helps much.