Before you start
The IBM Informix database provides a variety of administration
tools, starting with the powerful
command that delivers detailed information about the server in ASCII
format, and including GUI tools such as the OpenAdmin
Tool (OAT). Developers using IBM Optim™ Development Studio already have
access to information about the structures of the tables and
references. With IBM Optim Development Studio, the structures can be
changed or adapted. The diagram created with the scripts in this
tutorial can only be displayed, but unlike Optim Development Studio,
don't give you the capability to change the structure of database
This tutorial explains how to extract the information from the system catalog and how to use that information as the basis for graphical output that will give you insight into the database relationships. Building on these basics that show how to select and display the DDL structures, experienced Informix administrators will be able to extend the functionality of the sample script and adjust it to the needs of their own local Informix installations.
Figure 1. Graphical illustration of a database
You'll learn where to find information about database data definitions (DDL structures) and how to write select statements to extract this information from an existing Informix database. You will see how to format the selected data so you get an XML file that holds the information to create a graphical overview of the system.
This tutorial is written for database administrators and application developers or programmers whose skill and experience are at a beginning to intermediate level of SQL and shell programming. You should have a general familiarity with using a Linux® or UNIX® command-line shell and a working knowledge of SQL. The knowledge of the Informix system catalog can help extend the sample scripts to meet individual needs.
To run the examples here, you need a Linux or UNIX system with at least 10 MB of free disk space. To run it on Windows®, some minor changes are needed. The query tool Informix dbaccess (provided by the server or separately installed) must be available.
The environment must be set correctly for connecting to the Informix instance. The user that runs these scripts must be able to connect to the database to be analyzed (with at least read access to the database). In addition, the user needs the ability to create files in the local working directory.