Introduction to Data Management

Accessing Databases With NonStop SQL
15873 Tandem Computers Incorporated 3-17
3. Creating any indexes for optimizing object access time, and any views that make it
easier to refer to particular data
4. Defining the database security by specifying the owner and type of access allowed
for each object, and by defining strategies for backing up the database through the
use of TMF
When you install NonStop SQL, you create the data dictionary for the database and
the first catalog in the dictionary. Then, as you add new objects to the catalog, or
create new catalogs, the dictionary expands. You do not modify the dictionary
directly—NonStop SQL takes care of this for you automatically.
Maintaining the Database and Dictionary
After defining the database and dictionary, and planning the security and recovery
strategies for it, you are ready to load the database with data.
Before you do any massive loading, you might want to test the database by loading
only a few records and then doing some quick queries against them. SQLCI provides
a convenient statement to let you load these records interactively. You enter this
statement once for each row (record), specifying the column values you want as
statement parameters. When you are satisfied with your testing, you can request
high-volume loading through either of two SQLCI utilities. These utilities load
massive amounts of data from disk or tape files, written in either NonStop SQL or
ENSCRIBE format, into the table you designate.
Once the database contains your data, you can periodically print reports based on
information maintained in the dictionary. For instance, when applications start using
the database, you can monitor their performance and make any changes to the
database that they require. You can generate reports that provide information about
table and column names to help users make up queries. You can request reports that
show which objects depend on others, as an aid in assessing the impact of changes to
the database. You can also get reports on execution statistics for every SQL statement,
and use them to decide whether you need indexes to optimize object access time.
As your database develops, you can create new tables, views, constraints, indexes,
and other objects—you need not create them all during the initial database definition.
You can alter a catalog in various ways without forcing changes to previously
prepared queries or applications that use the database. You can also easily modify
existing security attributes.
Developing Applications
that Use NonStop SQL
If you are an application programmer, you will develop and test programs that
perform fast online transactions on business databases, as shown in Figure 3-9. These
programs will be used in applications run by business professionals, clerical workers,
and other end users to access and modify data, and to generate complex formatted
reports.