Generation of External Schemas in ODMG Databases Manuel Torres Departamento Lenguajes y Computación Universidad de Almería Carretera Sacramento S/N. 04120. Almería. Spain mtorres@ual.es José Samos Departamento Lenguajes y Sistemas Informáticos Universidad de Granada Avenida Andalucía, 38. 18071. Granada. Spain jsamos@ugr.es Abstract In this work, a method for generating external schemas in object oriented databases in the ODMG framework is proposed. External schema generation involves obtaining all the relationships existing between the classes selected to make up an external schema. This generation process is part of an external schema definition system that we are developing, which allows the definition of external schemas in ODMG. External schemas generated with this process do not extend the object-oriented paradigm and, the generation of unnecessary intermediate classes is avoided. 1. Introduction Definition of external schemas in object-oriented databases (OODBs) requires a mechanism to define derived classes from other previously defined classes (base classes, that can be derived or not), in the same sense there exists a view 1 definition mechanism in relational databases (RDBs). Derived classes allow us to customize existing classes, and their definition should be similar to the view mechanism existing in RDBs [1] (by means of a declarative language like SQL). In addition, its functionalities should be extended to take into account the richness of the object-oriented model (e.g. adding or redefining methods). In order to include such functionalities in OODBs, in the 90’s, numerous proposals were developed [1, 2, 8, 13, 16, 18] so that the three level ANSI/SPARC architecture can be applied for OODBs as in RDBs. In general, these works use particular object models and they differ respect to the schema where the integration of derived classes is 1 In the object-oriented context, some authors identify the term “view” with the external schema; others consider it just as a derived class. In order to avoid confusion, in this work the term “view” will not be used in this context. Instead of, the terms “derived class” and “external schema” will be used. carried out, and to the relationship used to integrate them [11]. ODMG (Object Data Management Group), an association of the main companies involved in the development of object-oriented software, since the middle of the 90’s, has been developing a set of specifications in order to define a standard to guide the development of object-oriented development platforms and to allow the development of portable solutions. In ODMG-93 [3], the inclusion of some functionality to define views (referred to derived classes) was proposed as future work. In ODMG 2.0 [4], named queries were introduced; they were proposed as a view mechanism. However, ODMG named queries are not reusable as input to new queries. The current release, ODMG 3.0 [5], keeps the same definition for named queries and does not specify the definition of external schemas. Classes are stored in schemas as independent files and a centralized management for these files is not addressed. Therefore, on one hand, there exist different proposals for defining external schemas in OODBs, but they use non-standard object models. On the other hand, ODMG, the current de facto standard in the object industry, does not address the definition of external schemas. Then, we think that it is necessary to develop an external schema definition system for ODMG databases. With this system, functionalities to define external schemas can be added to ODMG databases adapting them to the ANSI/SPARC architecture. In this work, a methodology for defining external schemas in the framework of ODMG and an algorithm to generate them are proposed. External schemas generated with our approach do not include unnecessary intermediate classes and preserve the object-oriented paradigm. Since ODMG named queries are not enough to define derived classes, the extension proposed in [12] will be used to such purpose. The remainder of this paper is organized as follows. Section 2 overviews the ODMG 3.0 object model and describes an existing methodology to define external schemas in ODMG. In Section 3, our methodology for defining external schemas is described. Section 4