Pathmaker Programming Guide

Using Null Values
Defining Data for a NonStop SQL Pathmaker Application
C–4 067868 Tandem Computers Incorporated
Using Null Values in
Database Requesters
This subsection focuses on two topics:
Restrictions on using null values in a DB requester
Displaying null values on a DB requester screen
If you choose to use a DB requester to perform operations on a database that contains
null values, you should read “Restrictions on Using Null Values” carefully. While
Pathmaker DB requesters can read null values, they cannot insert or update null
values.
By default, DB requesters use question marks to display null character data and
number nines to display null numeric data on the application screen. “Changing the
Display Character for Null Values” later in this section describes how to change these
default values.
Restriction on Using Null Values
DB requesters use a standard server to read, update, and delete data from tables. The
standard server for SQL tables can read tables that contain null data. Remember,
though, that:
A primary key cannot include columns that accept null values.
You cannot insert a null value into a column by using a DB requester.
Whether or not a column accepts null values is considered part of the data type.
Where data types must be equivalent, both columns must either accept null values
or prohibit null values.
DB requesters allow you to access more than one table or view from a single
requester. DB requesters that access more than one table or view are called
multifile applications (multifile DB applications are discussed in detail in Section
3). In a multifile DB requester, tables and views are linked through a join column
in parent-child relationships.
You cannot generate a multifile DB requester application with a join column that
accepts null values.
You cannot update a column to null data by using a DB requester.
For example, suppose you have a table, MEMBER. The primary key of MEMBER
is MEMBERNUM, which uniquely identifies two columns: MEMBERNAME and
SPOUSENAME. MEMBERNAME does not allow null values. SPOUSENAME
does allow null values.