Natural supplies DBMS (database management system) interfaces to access data stored in an Adabas database, a relational database management system (RDBMS) and/or a non-RDBMS.
Natural applications can access user data in multiple DBMSs concurrently. Data stored in a DBMS can be accessed randomly as opposed to print files and work files (see the relevant section), which are accessed sequentially.
Supported DBMSs include Db2, DL/I and VSAM data sets.
This section provides information on the DBMSs supported by Natural and the principles of accessing data in a database from within a Natural application.
Natural supplies interfaces for the following database management systems (DBMSs):
The Natural for Adabas interface provides access to data stored in an Adabas database.
Adabas is Software AG's database management system. Adabas supports relational as well as nested relational data structures.
The Natural for Adabas interface is an integrated part of Natural that allows access to Adabas databases on local computers. For remote access, additional routing and communication software is required such as Software AG's Entire Net-Work. In any case, the type of the host machine running the Adabas database is always transparent to Natural.
Accessing Data in an Adabas Database - Programming Guide
Adabas documentation
The Natural for DL/I interface provides access to data stored in an IMS DB database.
DL/I is IBM's data manipulation language of IMS DB. IMS is a database and transaction management system from IBM.
Natural for DL/I documentation
The Natural for Db2 interface provides access to data stored in IBM's Db2 UDB for z/OS operating systems.
Natural for Db2 documentation
The Natural for VSAM interface provides access to data stored in VSAM data sets.
VSAM is an IBM access method to maintain records of different data set organizations: key-sequenced data sets, entry-sequenced data sets or relative-record data sets.
Natural for VSAM documentation
Natural data manipulation language (DML) provides a common data
access syntax across all DBMSs supported by Natural. Natural DML allows Natural
objects to access different DBMSs by using the same language statements (DML
statements) such as FIND
,
READ
,
STORE
and
DELETE
.
Natural determines the DBMS from its configuration files and translates the DML statements into database-specific commands; that is, Natural generates direct commands for Adabas databases, SQL statement strings and host variable structures for RDBMSs using SQL.
A Natural object using a DML statement that does not contain a database-specific clause can be executed against different DBMSs. A DML statement that contains a database-specific clause must be changed before it can be used for a different DBMS. Database-specific considerations are described in the Statements documentation.
Database Access and Update - Statements documentation
In addition to DML statements, Natural provides a special set of
SQL statements for exclusive use in conjunction with RDBMSs. SQL statements
include SELECT
,
INSERT
,
UPDATE
,
DELETE
,
COMMIT
and
ROLLBACK
.
SQL-specific statements are described in the Statements
documentation.
Flexible SQL and facilities for working with stored procedures complete the set of special SQL statements. Flexible SQL allows arbitrary SQL syntax.
Using Natural SQL Statements - Statements documentation
Database Access and Update - Statements documentation
Natural provides an object called data definition module (DDM) that allows convenient and transparent access to database files of different DBMSs.
A DDM constitutes a logical view of a physical database file. The DDM contains information on the individual fields of the file - information which is relevant for the use of these fields in a Natural object.
A DDM establishes the connection between Natural data structures and the data structures in the DBMS to be used. Such a database structure might be a table in an RDBMS, a file in an Adabas database or a VSAM data set. Hence, the DDM hides the real structure of the accessed database from the Natural application.
The diagram below shows how Natural can access multiple databases from within a single application by using references to DDMs that represent the specific data structures in the specific DBMS: