External Databases (client-server)
LDL++ permits the use of external database relations in addition to
locally defined relations. The program or the rule base makes no semantic
distinction between these different kinds of relations. Of course the syntax
for declaring these external relations as schema in a LDL++ program is
possibly different for different kinds of data sources, eg: Sybase, Ingres
etc.
The current release of the LDL++ system has support Sybase,
Oracle and DB2.
The following is the schema declaration needed for Sybase relations:
database( {
sybase::<Relation>:(<field 1>:<Type 1>,
<field 1>:<Type 2>,
<field n>:<Type n>)
local_name <Local relation name>
from <Sybase server name>
use <Database name>
user_name <User name>
application_name <Application name>
interface_filename <Sybase interface file name>
password <Password>
})
The schema definition makes use of the following key words:
-
local_name:
This is the local name to be given to the external relation.
-
This avoids
conflicts if we have two relations from different sources with the same
name.Type:string.
-
from:
This specifies the database server we want to use.
Type:string.
-
use:
This specifies the database we want to use from a given server.
- Type:string.
-
application_name:
The name of the application. Type:string.
-
interface_filename:
This specifies the location of the interface file
-
for sybase applications.
Typically this file contains the communication
port addresses for the servers.
Type:string.
-
password:
The password of the user. Type:string.
Now the sybase relation can be used as a local relation by using its
local name as specified above.
Carlo Zaniolo, 1997