Database Reference
In-Depth Information
Table 2.
Explanation. The USING clause of OntoQL
can be used to specify the natural language in
which a query is expressed. The left query used
English names. For names with a space (e.g., first
name) double quotes are used. The right query is
equivalent but written with French names.
SELECT “first name”,
“last name”
FROM User
USING LANGUAGE EN
SELECT prénom,
nom
FROM Utilisateur
USING LANGUAGE FR
Requirement 5 (SQL Compatibility)
Requirement 4 (Ontology
Model Extensibility)
If a default namespace is not specified, each ele-
ment of an OntoQL query without a namespace
alias prefix is considered as an element of the
logical model (a table or a column). Thus, an
OntoQL query without namespace specification
is considered as a SQL query (requirement 5).
Moreover, the semantics of OntoQL (an algebra)
has been defined so that each operator returns a
relation (Jean et al., 2007a). Thus, queries at the
logical level and ontological level can be combined
(like Oracle).
The ontology model supported by OntoQL can be
extended using its ODL. Example. Add the OWL
constructor AllValuesFrom
CREATE ENTITY #AllValuesFrom UNDER
#Class(
#onProperty REF(#Property),
#allValuesFrom REF(#Class)
)
Explanation. An OWL restriction being a class,
the ALLValuesFrom constructor is added as a
subentity of #Class. This entity has an attribute
#allValuesFrom to specify the class in which its
instances take their values for the property defined
by the attribute #onProperty.
When an extension is made by specialization,
like in the previous example, new entities inherit
the behaviour of their super entities. This behaviour
is defined in the operational semantics of the core
ontology model. Thus, every specialization of the
entity #Class defines a new category of classes
which supports by inheritance the usual behaviour
of a class. As a consequence, each OWL restric-
tion may be associated to a container to store
its instances. These instances may be computed
using a view (all instances having all values of
a property in a given class). However, OntoQL
does not provide yet the capability to express this
semantics.
Requirement 6 (Access to the
Conceptual Model of Data)
OntoQL provides basic functionalities to define
and access the conceptual model of data. Example.
Create the conceptual model corresponding to
the class User knowing that only the properties
first_name, last_name and email will be used in
the target application.
CREATE EXTENT OF User (“first
name”, “last name”, email)
TABLE T_User (first_name, last_
name, email)
Explanation. The CREATE EXTENT state-
ment defines the conceptual model corresponding
to a class specifying the set of properties used to
describe instances of this class. The TABLE clause
is used to choose the logical implementation of
this conceptual model (i.e., tables and columns
necessary).
 
Search WWH ::




Custom Search