Natural and Database Access

This document gives an overview of the facilities that Natural provides for accessing different types of database management and file management systems.

The following topics are covered:


Database Management Systems Supported by Natural

Natural offers specific database interfaces for the following types of database management systems (DBMS):

  • Nested-relational DBMS (Adabas)

  • SQL-type DBMS (Db2, Oracle, Sybase, Informix, MS SQL Server)

  • File systems (VSAM)

The following topics are covered below:

Adabas

Via its integrated Adabas interface, Natural can access Adabas databases either on a local machine or on remote computers. For remote access, an additional routing and communication software such as Entire Net-Work is necessary. In any case, the type of host machine running the Adabas database is transparent for the Natural user.

SQL Databases

Natural for Db2 offers one common set of statements to access Db2 database management systems. For detailed information, refer to Natural for Db2 in the Database Management System Interfaces documentation:

VSAM

With the Natural interface to VSAM, a Natural user can access data stored in VSAM files. For detailed information and special considerations on the use of Natural statements and system variables with VSAM, see Natural for VSAM in the Database Management System Interfaces documentation.

Profile Parameters Influencing Database Access

There are various Natural profile parameters to define how Natural handles the access to databases.

For an overview of these profile parameters, see the section Database Management in Profile Parameters Grouped by Category in the Parameter Reference documentation.

For a detailed parameter description, refer to the corresponding section in the Parameter Reference.

Access through Data Definition Modules

To enable convenient and transparent access to the different database management systems, a special object, the "data definition module" (DDM), is used in Natural. This DDM establishes the connection between the Natural data structures and the data structures in the database system to be used. Such a database structure might be a table in an SQL database or a file in an Adabas database. Hence, the DDM hides the real structure of the database accessed from the Natural application. DDMs are created using the Natural DDM editor.

Natural is capable of accessing multiple types of databases (Adabas, Db2, or VSAM from within a single application by using references to DDMs that represent the specific data structures in the specific database system. The diagram below shows an application that connects to different types of database.

Natural Application DDM1-4

Natural's Data Manipulation Language

Natural has a built-in data manipulation language (DML) that allows Natural applications to access all database systems supported by Natural using the same language statements such as FIND, READ, STORE or DELETE. These statements can be used in a Natural application without knowing the type of database that is going to be accessed.

Natural determines the real type of database system from its configuration files and translates the DML statements into database-specific commands; that is, it generates direct commands for Adabas, SQL statement strings and host variable structures for SQL databases.

Because some of the Natural DML statements provide functionality that cannot be supported for all database types, the use of this functionality is restricted to specific database systems. Please, note the corresponding database-specific considerations in the statements documentation.

Natural's Special SQL Statements

In addition to the "normal" Natural DML statements, Natural provides a set of SQL statements for a more specific use in conjunction with SQL database systems; see SQL Statements Overview (in the Statements documentation).

Flexible SQL and facilities for working with stored procedures complete the set of SQL commands. These statements can be used for SQL database access only and are not valid for Adabas or other non-SQL-databases.