Distributed databases

 

Overview

During a transaction, it is possible to reference several remote tables, in addition to local tables.  Generation takes into account these functions, by adding the name of the feature to the handling language, after the table's complete name.  This notation interpreted by Oracle allows "transparent" access to distant data.

 

 

Tagged values

 

The ... tagged value

is used to ...

Oracle

{dbName}

specify the name of the service and the name of the facade package.

@

 

Example:   Annotation of the "Employee" class with the {dbname}(hq,objecteering, com) tagged value.  A request in the relational table resulting from the "Employee" class will take the following form:

 

SELECT * FROM Employee@hq.objecteering.com;

 

 

Consequences for generation

The definition language related to the classes annotated with the {dbName} tagged value is separate from the rest of the code generated for local classes.  A file is generated for each annotated class.  The file name is the concatenation of the class name, with the "Of" character string, and with the first parameter passed to the {dbName} tagged value.

 

Example of file name: EmployeeOfhq.

 

 

Restrictions

The generation checks that there is no association between classes annotated with a different database name.

 

 

Remarks

To reach a distant database, the service named (DNS) must be operational.  If this is not the case, a link towards the distant database must be created in the following way:

 

CREATE DATABASE LINK hq.objecteering.com USING 'service_name';

 

The service name should correspond to the data entered in the "tnsnames.ora" file. (please refer to the SQL*Net Administrator's guide).