cc/td/doc/product/wanbu/84/nms
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Custom Access to the Database

Custom Access to the Database

This chapter presents three approaches that a user can employ to provide a custom front end capability for accessing the StrataView Plus database (Release 8.4). The first approach uses INFORMIX_SQL as the front end, the second uses Informix WingZ as the front end and the third uses the Informix ESQL/C to compile a custom written front end program.

INFORMIX-SQL

INFORMIX-SQL is a standard software package from Informix Software Inc. that operates with an INFORMIX database engine. The two programs together provide a complete database management system. Using the Structured Query Language (SQL) and INFORMIX commands, the user can create, delete, read and update relational databases.

When used as an alternative front end to StrataView Plus, the particular database engine program is INFORMIX-OnLine and the database is created and updated by StrataView Plus. The INFORMIX-SQL front end is used as a "Read Only" front end only as shown in Figure 2-1.


Figure 2-1: INFORMIX-SQL as a Front End

INFORMIX-SQL should be installed and started to operate concurrently with StrataView Plus. Installation consists of deciding the directory to hold the program, creating user informix and group informix, copying the software from the distribution media to the chosen directory and running the installsql script. Full details of the installation process are provided by Informix with the software.

The environment variable of INFORMIXDIR, PATH, INFORMIXTERM and TERM must be set (Informix and UNIX documentation provide the details) and the main program, ISQL, can be started.

ISQL is a menu-driven program which allows the user access to virtually all the facilities provided by INFORMIX-SQL. A Query-Language option permits the user to create, delete and modify databases using SQL.

StrataView Plus comes with a dbaccess application which allows an operator to browse the database online, and perform SQL queries. This application is useful for examining objects in the database and for running SQL scripts. The SQL scripts that can be fed to dbaccess requires the use of UNIX utilities (for example, echo and pipe) and SQL knowledge. The rsh scripts can be used to feed other applications.

WingZ

WingZ is an advanced spreadsheet program from Informix Software Inc. that operates under UNIX and within the OSF/Motif environment which presents a friendly graphical interface to the user. WingZ includes HyperScript, a WingZ control language, which allows the automation of repetitive and sequences of tasks.

DataLink is a WingZ hyperscript application that permits users to interact with SQL databases through WingZ. DataLink operates concurrently with WingZ, both within the OSF/Motif environment. The OSF/Motif permits the display, sizing, and moving of multiple windows on the screen. The arrangement between WingZ, DataLink, StrataView Plus and the database is shown in Figure 2-2.


Figure 2-2: WINGZ/DataLink as a Front End

With StrataView Plus, WingZ, and DataLink all installed and started, a DataLink menu is added to the standard WingZ menu. Through this menu the user can log on to the StrataView database and can display any of the rows and columns in any of the database tables. Under this arrangement the WingZ HyperScript can be used to build up sequences of tasks which can be executed automatically.

Data can be displayed selectively using Boolean-like criteria and tables can be joined so that data from multiple tables can be included in a single display.

For details of WingZ and DataLink installation and operation, refer to the Informix documentation supplied with the software.

ESQL/C

Development of ESQL-C applications requires an ESQL-C compiler which can precompile the macros that are used within the application code. The ESQL-C compiler, a special purpose compiler from Informix Software Inc., is not included with the StrataView Plus product. The compiler accepts, as input, programs written in C which contain embedded SQL statements. ESQL/C compiles the program into a straight C program by converting the SQL statements into suitable declarations and function calls using an SQL library. The resulting C program is then compiled with a system C compiler to produce a front end program in executable code. The process is shown in Figure 2-3.


Figure 2-3: Custom Front End using ESQL/C

The resulting front end program is a truly custom front end since the program is entirely under the control of the programmer.

hometocprevnextglossaryfeedbacksearchhelp
Copyright 1989-1997 © Cisco Systems Inc.