Maybe I'm barking up the wrong tree, but a lot of what your doing sounds like rewriting of PerlMyAdmin, which does many of the same things, database display and editing and so forth. Or a slightly better developed solution, in *gasp* php, PhpMyAdmin.