Database Reference
In-Depth Information
STILLIMAGE and all the needed requirements to process it. However, other complex domains, such as
video and audio, can be manipulated following the same approach. Other important issues are related
to the need of incorporating constructions in the SQL that allow:
In the Data Definition Language (DDL):
To define similarity measures that specify the distance function to be employed and the
structure that represents the data to be compared by similarity. Each data domain demands
structures and similarity functions tailored to the inherent features of the underlying data;
To specify multimedia data types when defining a table;
To associate multimedia domain attributes with the available similarity measures;
To define indexes for multimedia domain attributes.
In the Data Manipulation Language (DML):
To insert and/or update the data in a multimedia database;
To allow specifying similarity queries in an integrated manner with the other resources of the
SQL, including operations such as selection and join.
In the following subsections, we describe a strategy that addresses all these issues, extending the
syntax of DDL and DML commands. The definition of these extensions requires both, the description
of the new constructors (i.e., the language syntax) and their meaning (i.e., the language semantics). In
order to specify the syntax of the SQL extension we employ the BNF (Backus-Naur Form), a widely
adopted notation for the specification of program languages. For the meaning specification of the new
constructors, we use suggestive examples and informal descriptions.
Extending DDL Commands
Each image is stored as the value of an attribute of the STILLIMAGE data type. Thus, recalling the
Landscapes example table of the previous section, the Picture attribute should be of type STILLIMAGE.
As pointed previously, a key functionality of a DBMS enriched with similarity data management
is how to allow the similarity evaluation to be domain-specific. Since there is no concept resembling
the definition of comparison operators in SQL, it is needed to create new commands to do so. Metrics
should be stored in the database catalog, thus their manipulation commands should follow the DDL
command style. Hence, three new commands were defined to handle similarity comparisons: the CRE-
ATE METRIC, the ALTER METRIC and the DROP METRIC commands. Note that they are the only
new commands needed to support similarity queries, as the other modifications are just extensions on
existing commands. These commands rely on feature extractors to define the feature vectors used in
the similarity measures. Feature extractors, on the other hand, do not require new SQL constructions,
as they can be defined as stored procedures that receive a multimedia object and return the features.
Only the CREATE METRIC is described here as the other constructions are alike to it. The syntax
of this command is as follows: (see Algorithm 3)
As it can be seen, the CREATE METRIC syntax defines an instance of a similarity space, including
the distance function and the feature vector components. The feature vector is stated as a linear combi-
nation of existing feature extractors, allowing the DBMS to take into account various feature types in
the similarity evaluation. As an illustration, suppose two extractors are available: the HistogramEXT,
which returns an array of integers representing the color histogram of one image; and the LargestOb-
Search WWH ::




Custom Search