Conceptual Wrappers for Legacy Databases

 
Introduction

Table of contents


Related Papers


Further information about the Conceptual Wrappers


Conceptual Wrapper Architecture

The architecture comprises two main components, namely the conceptual wrapper and the conceptual middleware, both dedicated to a database. The conceptual wrapper offers a unique conceptual interface to the applicatioens whereas the conceptual middleware provides a transparent distribution across the network.


Figure 1 –  The architecture: conceptual wrapper and conceptual middleware 

Conceptual Wrapper

The Conceptual Wrapper is developed on top of a legacy database to give it a specific interface. In the InterDB approach, conceptual wrappers offer a conceptual interface based on the conceptual schema of the wrapped database. The queries are expressed into CQL (Conceptual Query Language), a variant of the OQL language which uses the semantics defined in the conceptual schema. Functionally, the conceptual wrapper translates the CQL queries expressed on conceptual schema objects into commands expressed on physical schema constructs. It also assembles the extracted physical data (records and rows) into objects (C++ or JAVA objects). For instance, a conceptual wrapper associated with a set of COBOL files translates the CQL queries into COBOL program codes and assembles the COBOL records into objects. The conceptual wrapper is based on the mapping between the physical schema and the conceptual schema. It is a program component dedicated to a particular database (i.e. the logical/physical and conceptual/physical mapping rules are hardcoded in the modules).

Current realizations

Conceptual Wrapper Interfaces for C and C++ programs and JAVA programs.
Conceptual Wrapper for Oracle 8, MS-Access and COBOL files (Computer Associates).


Conceptual Middleware
The conceptual middleware manages the communications between the conceptual wrapper and client applications. It offers the object distribution across the network. CORBA and RMI can be used as middleware in our architecture. CORBA and RMI are two distributed object standards supported by the OMG (Object Management Group). CORBA is an architecture standard for building heterogeneous distributed systems. RMI supports distributed objects written entirely and only in the JAVA programming language. For the future, enabling RMI to use the IIOP protocol to communicate with CORBA-compliant remote objects is expected. 


Generation of Conceptual Wrapper

Building the conceptual wrapper for a legacy database is a complex engineering activity. The InterDB approach proposes a strong formal basis for a generic methodology of wrapper generation. It is based on a formal transformational approach to schema engineering. This approach formally defines the mappings between the physical schema of the legacy data component and its conceptual schema, so that, it is possible to derive the wrapper from them in a systematic way. The methodology is supported by the DB-MAIN CASE tool that helps to generate the wrapper.


Methodology

Conceptual Schema Recovery

Recovering the conceptual schema of an existing local database is the main goal of the database reverse engineering process (DBRE). A general DBRE methodology has been developed in the DB-MAIN laboratory. It can be specialized according to the various data models which most legacy systems are based on, such as standard files, or CODASYL, IMS and relational databases.

Building the Mappings

The mappings are modeled through semantics-preserving transformations. By processing them, it is possible to derive functional mappings that explain how each conceptual construct is expressed into physical constructs. 

Conceptual Wrapper Generation

The conceptual wrapper relies on the physical and conceptual schema description and the mappings to translate queries and to form the result instances. 


CASE support
Manually developing wrappers can be considered for small databases only. Indeed, recovering the physical and conceptual schema, elaborating the functional mapping and writing the wrapping code are complex and tedious tasks.  On the other hand, completely automating these processes is unrealistic for real world systems.  Hence the need for computer-based assistance tools for each of these processes.

Reverse-engineering Support and Conceptual Wrapper Generetors

DB-MAIN, that gives the user an integrated toolset for reverse engineering and inter-schema mappings definition and processing. Besides standard functions to represent and manage abstract and concrete specifications, this tool provides a powerful environment, such as Voyager 2 meta-language, to develop domain-specific processors.  For instance, mapping analyzers, schema analyzers and wrapper generators have been written as seamless add-ons to the standard CASE engine without modifying neither the repository nor the standard functions.

Current realizations

Conceptual Wrapper Generators for Oracle 8, MS-Access and COBOL files (Computer Associates).

Work in progress

Conceptual Wrapper Generators for InterBase DBMS and Flexus COBOL files.



Application: Conceptual Wrapper and JAVA/JDBC

An application of the architecture concentrates on building a conceptual middleware as a JDBC driver to provide a JDBC-like interface to a JAVA application (Cf. Figure 2). The conceptual middleware is made up of a conceptual server and a JDBC-like driver.


Figure 2 - CQL/JDBC architecture

Conceptual Server
The conceptual server establishes the TCP/IP connection between the driver and the conceptual wrapper: it receives the queries sent by the driver and sends the result objects from the conceptual wrapper. We have used the RMI system to manage the communications between the conceptual server and the driver. 
JDBC-like driver
The JDBC-like driver is a JAVA API for executing CQL statements. Connected to the conceptual server, it provides to a JAVA application the JDBC-compliant classes and interface. The driver offers a standard API for heterogeneous databases based on a pure JAVA API and a common conceptual query language.
Such an architecture provides an adequate way for solving the DMS and platform heterogeneity that appears when one wants to build a multidatabase system. DMS independence is guaranteed by the conceptual wrapper. The wrapper provide an equivalent conceptual schema and a unique query language interface whatever the DMS wrapped. Platform independence is ensured by both the conceptual wrapper and JAVA.

Click here for some program examples using JDBC/CQL interface.


InterDB project - Head of InterDB project : Jean-Luc Hainaut jlh@info.fundp.ac.be
Address: Dept. of Computer Science, University of Namur, 21, rue grandgagnage, B-5000 Namur, BELGIUM
Telephone: Tel (+32) 81 72 49 96 (jlh) or 72 49 81 (InterDB staff) Fax (+32) 81 72 49 67 
  Copyright InterDB project (InterDB project is supported by the Belgian Région Wallonne)

Philippe Thiran - July 1999