GSQL - a Mosaic-SQL gateway

What is GSQL

GSQL is a gateway program that provides a forms interface in Mosaic to SQL databases. It creates forms based on commands found in proc files, and then assembles the user inputs into a SQL query that a DBMS can process. A sample form and the proc file used to create it can be found here.

Try me

Here're some examples of working databases:
  • Sybase: NCSA's helpdesk database.
  • Interbase: A historical census database.
  • Sybase: NCSA's supercomputer abstracts database.

    Download and Install

    The gateway comprises 2 programs, gsql and sqlmain. gsql is the form-creation program. sqlmain is the database backend program that processes queries. All these are available from anonymous ftp ie ftp.ncsa.uiuc.edu, in the directory /ftp/Mosaic/gsql. Download the file gsql.tar.

    Experimenting and getting started

    1) You need to have the http server running.
    2) Compile gsql using make.gsql.
    3) Make sure the shell script sample.script is accessible by the httpd server.
       ie, place it someplace the server can reach. (Then you can reach it from 
       Mosaic).
       Edit sample.script and modify the path to gsql and the path to sample.proc.
       Ensure that sample.script has execute permissions.
    4) Invoke sample.script from Mosaic as a URL such as:
        http://your-host/your-path/sample.script
       This should execute the script, which in turn would invoke gsql to parse
       sample.proc and create a form which looks like this.
       Note that sample.script must be in a directory that the http server recognize
    	as containing executables. Otherwise it won't execute the file, but just
    	prints its contents. You need to set the ScriptAlias variable in srm.conf.
    
    5) Experiment with the commands in the proc file sample.proc for creating forms.
       Try embedding images and multimedia using the TEXT and HEADING commands.
       Use EXEC to run commands and queries and create forms with up-to-date info.
    6) Now you can start building your database backend.
       You need to write a routine execute-sql() similar to that in sybproc.c.
       Compile using make.backend.
    
    

    For more details

    This has been a very short introduction to GSQL. See the other documents howto.html and proc-fmt.html for more details. One is a guide on installation and backend writing, the other is a guide to writing a PROC file.

    Send comments and URLs of your work to Jason Ng at likkai@ncsa.uiuc.edu.

    Jason Ng, NCSA, Dec 1993