Version 6.3.13 for Windows
 —  Database Management System Interfaces  —

Natural and Entire Access

This document describes how to prepare Natural for its use with Software AG's Entire Access.

The following topics are covered:


Purpose of Entire Access

Via Entire Access, Natural applications can transparently access multiple relational database management systems (RDBMSs), in both client-server and single-platform environments.

Entire Access has been designed to provide a common SQL-compliant application programming interface (API) for both local and remote database access. It represents a client-server solution for Software AG's database systems Adabas SQL Server and Adabas, as well as for various third-party products, for example, ODBC-compliant databases under Windows.

With Entire Access, a Natural user can access data in a relational database. In general, there is no difference between using Natural with Entire Access and using Natural with Adabas. Entire Access supports Natural DML and SQL statements which can both be used from within one Natural program accessing multiple database systems.

Natural converts Natural native DML and Natural SQL statements within Natural applications into calls to Entire Access, which performs the required data format translations and transfers these requests to the underlying database system via the appropriate database driver.

All operations requiring interaction with the database are performed by Entire Access. It supports local and/or remote databases and contains a series of database drivers, one for each supported RDBMS, so that multiple heterogeneous RDBMSs can be accessed concurrently from within the same Natural application.

For remote access, the transport media for SQL data are provided by Entire Net-Work, which establishes the communication link, or by TCP/IP.

Top of page

Configuring Entire Access

Under Windows, Entire Access can be used to access either local ODBC-compliant databases and/or remote databases on Windows and UNIX hosts.

Note:
If you want to access remote databases, you also have to install and use the Entire Access server component on the host platform; for further information and prerequisites, see the Installation chapter of the Entire Access documentation.

To be able to use Entire Access, you have to modify your global configuration file, establish a connection to the database(s) to be used, create database tables with the appropriate database tools, and generate a Natural data definition module (DDM) for each database table to be accessed by a Natural program.

Modifying the Global Configuration File

To be able to work with Entire Access, you have to modify the global configuration file (default name: NATCONF.CFG) as follows:

Start of instruction setTo modify the global configuration file

  1. Invoke the Natural Configuration Utility.

    The Natural Parameter Setting window appears with the name of the parameter file currently active or edited displayed in the title bar.

  2. Select the path Global Configuration File / DBMS Assignments in the tree view.

    A dialog appears in which you have to specify the DBID parameter.

    For all SQL databases that can be accessed via Entire Access, you always specify the same DBMS type: SQL.

    Via the DBMS parameter, you must then establish the connection to the actual database as described in the following section.

    Note:
    For each database you want to be accessed by Entire Access, you must repeat the specification of the corresponding DBID and DBMS parameter.

  3. Save the updated global configuration file.

Connecting Databases

The connection to the database(s) you want to work with must be established only once for each database. Subsequently, you merely have to log on to Natural and the database connection(s) will be established automatically.

Entire Access can support up to 7 different database drivers. Since the database drivers are reentrant, you can establish multiple separate connections to the same driver via a so-called database connect string.

Database Connect String

The database connect string represents the DBMS parameter you or your system administrator must specify with the Natural Configuration Utility during the modification of your global configuration file. It consists of the following syntax:

dbms:[db-name][@server-number:host-name!driver]

Syntax Element Description:

Syntax Element Description
dbms dbms is mandatory and specifies any supported driver; currently the following drivers are supported under Windows:
For ODBC-compliant databases:

ODBC for local and remote ODBC-compliant data sources.

For remote database access:

For remote access, you have to connect the Entire Access network component by specifying NET; see the Entire Access documentation for further information.

db-name
For ODBC-compliant databases:

db-name is mandatory and represents the name of your data source as it was defined to the ODBC Administrator.

Note:
The name of the data source is case-sensitive and must not contain any blanks.

For remote databases:

db-name is the name of your database if your database system requires a name; if not, it must be omitted. See the Entire Access documentation for further information.

server-number server-number is required for remote access only; see the Entire Access documentation for further information.
host-name host-name is required for remote access only; see the Entire Access documentation for further information.
driver driver specifies the database driver to be used; see the Entire Access documentation for further information.

Sample ODBC Connect String

To connect to an ODBC-compliant database with a data source called "sample", specify:

ODBC:sample

Making Entire Access Operational

Now Entire Access is connected to the database(s) to be accessed. The user ID of the default administrator is sag.

Start of instruction setTo make Entire Access operational

  1. Start your local ODBC-compliant database(s) in the usual way; for remote databases, refer to the Entire Access documentation.

  2. Start Natural.

    Entire Access can now be used and you can start a Natural session as usual.

Accessing Database Tables - the Natural DDM

To be able to work with Entire Access, you must create database tables or views using the appropriate tools provided by your database system(s).

To be able to access a relational database table or view with a Natural program, you must then generate a Natural data definition module (DDM) for the defined database table or view.

The DDM name must match the name of the corresponding table or view. Thus, you can create only one DDM for each table or view. It is recommended that the DDM name include the name of the table creator (owner) separated by a hyphen. The DBID in the DDM must correspond to the DBID assigned by the Natural Configuration Utility.

Once a DDM has been defined for a relational table or view, it is possible to access the data stored in this table or view by using a Natural program.

Entire Access translates the statements of a Natural program into SQL statements. It automatically provides for the preparation and execution of each statement.

In addition to the Natural native DML statements, Natural provides Natural SQL statements, which are described in the Natural Statements documentation; for further information, see also the Entire Access documentation.

For a description of how to create DDMs from relational database tables, refer to the section Creating DDMs in the Natural Editors documentation.

Top of page