The Object-Protocol Model (OPM) is described in [2]. OPM supports the specification of object classes and protocol classes. An object class is identified by a class name, has an optional class description, and is associated with attributes that qualify the objects (instances) of the class. OPM classes can be organized in a class hierarchy representing subclass-superclass relationships. A subclass is a specialization of its superclasses, and inherits all the attributes associated with its superclasses; multiple inheritance in class hierarchies is supported.
Attributes can have values that are atomic or consist of a tuple of atomic values, and can be single-valued, set-valued, or list-valued. Attributes take values from other classes or are associated with system provided data types. OPM supports the specification of derived attributes using derivation rules involving arithmetic expressions, aggregate functions, and attribute composition.
Attributes can be generic or versioned. Generic attributes can be used for describing stable properties of an object or protocol (such as the social security number of a person), while versioned attributes can be used for describing the evolving properties of an object or protocol (such as the address of a person).
Protocol classes in OPM are used to model laboratory experiments. Given an input, a protocol instance (experiment) results in an output, where both input and output consist of objects. OPM supports the recursive specification (expansion) of protocols. Protocol expansion in OPM allows specifying a protocol in terms of alternative subprotocols, sequences of subprotocols, and optional protocols. A protocol class can be associated with regular as well as input and output attributes. Input and output attributes are used for specifying input and output connections between protocols.
OPM also supports two types of derived object classes: derived subclasses and derived superclasses. A derived subclass is defined as a subclass of another derived or non-derived object class with an optional derivation condition. A derived superclass is defined as a union of two or more derived or non-derived object classes.
The OPM query language (OPM-QL) follows the ODMG-93 standard for object-oriented query languages [5]. OPM is currently implemented on top of relational database management systems (DBMSs). In order to implement OPM on top of a relational DBMS, an OPM Schema Translator maps OPM schemas into DBMS-specific relational schema definitions and SQL procedures [4]. The OPM Schema Translator also generates a metadata file with information regarding the correspondence of OPM and DBMS elements.
In this document we describe the OPM Query Translator for OPM 4.1. The OPM Query Translator is based on the metadata file mentioned above, maps OPM queries into SQL queries and/or procedures, executes these SQL queries and procedures, and returns the query results structured in terms of OPM constructs.
The rest of this document is organized as follows. The OPM query language is described in section 2. Query translation strategies are discussed in section 3. The OPM query translator is presented in section 4. Section 5 contains a user guide for the OPM Query Language Translator. An OPM schema example is given in Appendix A. Appendix B contains the syntactic definition for the OPM query language.