Information Technology Reference
In-Depth Information
DEFINE
Source
PL/1
Program
Reader (DEFINE)
compiler phase
DEF S1
DEF S2
:
:
Reader (S1)
Reader (S2)
:
:
DEFINE
Compiler
Convert
catalog
CONVERT
program
PL/1
Procedure
Restructurer
(CONVERT)
compiler phase
DEFINE
Compiler
Statement 1
Statement 2
:
:
COP 1
COP 2
:
:
CONVERT
Catalogue
Execution
Schedule
Fig. 4.4 DEFINE and CONVERT compile phase
As in the case of the interpretive translator approach, two languages are used.
One describes the source and target database file and the other describes the map-
ping between source and target database files. There are two phases to the transla-
tion process; the compile time phase and the run time phase. In the compile time
phase, the specialized translator program is generated; in the run time phase, this
program is executed.
For example, Shu et al. ( 1975 ) implemented EXPRESS, which can access a wide
variety of data and restructure it for new uses by program generation techniques.
The function of the EXPRESS system is to translate and execute the specification
languages DEFINE and CONVERT. The DEFINE description is compiled into a
customized PL/1 program for accessing source data. The restructuring specified in
CONVERT is compiled into a set of customized PL/1 procedures to derive mul-
tiple target files from multiple input files. The general architecture of the DEFINE
compile-time phase and the general architecture of the CONVERT compile-time
system is shown in Fig. 4.4 .
As an example, consider the following hierarchical database (Fig. 4.5 ):
Search WWH ::




Custom Search