NaturalONE Version 8.3.7
 —  Predefined Object Types in Predict  —

SQL File Types

Predict offers various file types for documenting tables and views of the SQL systems listed below. The file objects which document the SQL tables and views can be used to generate SQL CREATE statements, DDMs and copy code members for 3GLs. The CREATE statements are stored as Natural members in file FDIC.

This document covers the following topics:


Naming Conventions for SQL Objects

Special naming conventions apply to the following objects in Predict

  Filetype
  AT,B, A(SQL) BT, BV D, E, IV, IT JT, JV OT, OV X XT, XV YT, YV
Convention Maximum length of table/view name 32 18 18 24 30 18 18 30
Upper case     Y   Y Y    
Upper/lower case Y Y   Y     Y Y
'_' allowed at first pos.     Y Y       Y
'#' allowed at first pos.   Y Y          
'$' allowed at first pos.   Y Y          
'@' allowed at first pos.   Y Y          
'_' allowed from second pos. Y Y Y Y Y Y Y Y
'#' allowed from second pos.   Y Y Y Y Y   Y
'$' allowed from second pos.   Y Y Y Y Y   Y
'@' allowed from sec. pos.   Y Y Y       Y
Numbers allowed from second pos. Y Y Y Y Y Y Y Y

Type-specific rules are also given in the respective parts of this section.

Top of page

Common Parameters for SQL File Types

The following parameters are valid for all or most SQL file types.

SQL Attributes

SQL attributes

These parameters apply to all SQL views.

Select
A Select all: Redundant duplicates are not eliminated.
D Select distinct: Redundant duplicates are eliminated.
With check option
Y All inserts and updates to the view are checked against the view definition.

Additional attributes / Associations

Profile options are described in the section Defaults in the Predict Administration documentation. The editors are described in the section Editors in Predict in the Predict Reference documentation.

Subquery

Subquery

This option is available for all SQL views.

Check Expression

Check expression

This option is available for the following SQL tables:

It is also available for the following file type:

No special checks are performed when check expression is saved.

Top of page

Field Lists of SQL Views

Field list

Column Meaning
Ty Field type.
L Field level.
Field ID ID of field object documenting the SQL view. The ID of the field object in Predict documenting a field in a view can differ from the name of the field in the original table or view.

Adding new Fields to Field Lists of SQL Views

New fields can easily be inserted into the field list of an SQL view using one the following two methods:

Manually

Enter parameter Field ID described above. See the section Naming Conventions for SQL Objects.

Import

Choose Import to import fields from other SQL tables or views into the current field list.

Top of page

Editing the Subquery of an SQL View

Structure of a Subquery Clause

The following rules apply:

Top of page