in reply to How to go about accessing differing database table requirements with out rewriting perl code.

You need to be clear about what sort (and what amount) of extendability you really want to add: The last two points, IMHO, are not things you would want to do via a web/cgi process -- they should be mediated (authorized) by someone with adminstrative authority on the particular machine where the DB is going to run.

But once a user account and database are established for a cgi script to connect to, it does seem like a pretty straight-forward exercise to design a web interface that allows for the creation of tables, data input methods (web forms, uploaded data files or both), and definition and storage of commonly used queries, updates or deletions.

One thing to think about will be what amount of expertise you can expect on the part of the web user. Is this being set up for people who already know SQL, or for inexperienced users? This involves deciding whether you grant a lot of power and flexibility, or offer a relatively limited range of options for defining tables and operations on them.

All database engines provide a means to query for table names and definitions (e.g. "show tables" and "describe some_table" in mysql), so putting this information dynamically into a web page is trivial. Providing an effective means for dynamically building queries and other operations will involve some cleverness and art (and details will depend on your particular DB server and expected users), but it shouldn't be overly complicated.

  • Comment on Re: How to go about accessing differing database table requirements with out rewriting perl code.