Using schema information for querying databases
Iztok Savnika, Zahir Tarib, Toma<=z Mohori<=cc
aComputer Systems Department, Jo<=zef Stefan Institute, Slovenia bSchool of Information Systems, Queensland University of Technology, Australia cFaculty of Electrical Eng. and Computer Science, University of Ljubljana, Slovenia
We propose the set of simple operations for inquiring about the properties of individual objects and classes of an objectoriented database. The operations form the basis of an algebra for objects called OVAL. They are defined using the constructs introduced for our formalization of the object-oriented database model. The operations allow a user to query: (i) associations among individual objects, (ii) relationships between individual objects and class objects, and (iii) relationships among class objects themselves.
Object-oriented database model provides a rich set of modeling constructs that make the conceptual schema of an object-oriented database more expressive than relational schemas. We observe that, comparing a relational database to an object-oriented one, some information about the modeling environment has been moved from the data part to the schema part of the database. Hence, some aspects of the modeling environment can be, using an objectoriented database model, represented and stored in a database by means of a database schema. Consequently, the schema part of an object-oriented database should be treated in a similar manner as the data part of the database: it is, like ordinary data, the subject of the user's inquiry and modification.
In general, there are two types of queries which relate to the conceptual schema. Firstly, the user should be able to query the relationships between the instances and the conceptual schema of a database. Secondly, due to the frequently very complex conceptual schema, a user should be able to query it in order to obtain a precise mental image of the structure and the behavior of stored information .
In this paper we present the operations of the algebra for objects called OVAL, which are used for querying conceptual schema. The following section briefly overviews the work related to OVAL. Next, the basic constructs used for the formalization of the OVAL's data model are defined in Section 3. The basic operations of the algebra OVAL are presented in Section 4. Finally, the concluding remarks are given in Section 5.
2 Related work
The constructs that recent query languages provide for querying database schema are briefly presented in this section. To our knowledge, recently proposed database algebras (e.g., Query algebra , Excess  or Complex Object Algebra ) do not include such facilities.
Firstly, most recent query languages (e.g., query languages of ORION  or O2 DBMS ) provide the constructs for using the class extensions  in queries. In  Bertino proposes the use of operator CLASS OF , which returns the class of an object at run-time. The resulting class can be further used in a query. Next, ORION  provides a set of operations for modifying database schema at different levels: modification of inheritance, class properties, methods and inheritance hierarchy of classes.
In  Kifer and Lausen propose a declarative language based on logic, called F-Logic, which includes the capabilities for querying database schema. The relationships between instances and classes, which are based on the isa hierarchy of database objects, can be in F-Logic queried using the predefined predicates for testing class membership and subclass relationship. Further, F-Logic provides the capabilities to explore the properties of individual and class objects by treating attributes and methods as objects that can be manipulated in a similar manner to other database objects. In this way, some types of non-trivial relationships among objects such as the analogy and the similarity relationships can be expressed in F-Logic.
Next, the query language XSQL  includes a set of constructs for querying database schema. XSQL queries can include variables that range over class objects. Therefore, classes can be queried on the basis of their properties and the properties of their instances. The XSQL operation subclassOf can be in this context used to inquire about the relationships among classes which are based on the inheritance hierarchy of classes. In a similar manner to F-Logic, XSQL also treats attributes and methods as objects that can be queried; hence, a user can inquire about the properties of individual and class objects.
Finally, in  Papazoglou suggests a set of highlevel operations for expressing intensional queries which aid a user to understand the meaning of stored data. The proposed operations can express the fol-