Information Technology Reference
In-Depth Information
from OSQL's query graph ofnavigation classes to the SQL's query graph of join
relations. Its procedure can be described as follows (Fong 2002 ):
Step 1. Decompose OSQL query transaction.
During this step, the OSQL query transaction is decomposed into groups by pars-
ing its syntax as:
SELECT {attributes-list-1} FROM {class-list}
WHERE {data-navigation-path}AND/OR {search condition-1}
ORDER BY {attribute-list-2} GROUP BY {attribute-list-3} HAVING
{search-condition-2}
Step 2. Create the query graph of OSQL through its classes' navigation paths.
Based on the input OODB schema, a navigation path can be created to indi-
cate the relationship between an association attribute and the OID of its associated
classes, i.e., to express the pointer structure between two associated classes. The
OID in OSQL is implemented by the Attribute_type field of Attribute Class in frame
mode. The pointer structure is actually the OID of the associated classes, and the
stored OID of the association attribute. The navigation path can be expressed in the
following pointer structure:
Navigation path: Root Class (Association attribute) = Associated Class (OID)
In the case of class inheritance, the same object can appear in the superclass and
its subclass. There will be no pointer structure between them. Instead, the subclass's
object will contain all the information of its superclass. As a result, for any query
transaction involving a subclass, we can use subclass as a root class for navigation.
Navigation path: Root class (subclass) = Associated class (superclass)
Step 3. Map the OSQL query graph to SQL query graph.
From the navigation path of OSQL, we can locate the root class and its associ-
ated class through its association attribute. For each class, we can also locate its cor-
responding relations in RDB from the result of the preprocess of mapping OODB
schema to RDB schema. The corresponding query graph of SQL is the path of the
join of the mapped relations.
Step 4. Translate OSQL query transaction to SQL query transaction.
From the query graph of SQL query transaction, a corresponding SQL transac-
tion can be constructed by:
• Replacingthenavigationpathofclassesinthetargetattributesbytargetattri-
butes only.
• Replacingthesourceclassbytheircorrespondingrelations
Search WWH ::




Custom Search