Database Reference
In-Depth Information
method library used in SIREN to provide the distance functions and the MAMs. As FMI-SiR O follows
the Oracle Extensibility Framework, it is integrated to the query processor and its operations are all under
the DBMS transactional control, except the index updates, whose concurrency control is responsibility
of the indexing library.
Multimedia data and their feature vectors are stored in BLOB columns in FMI-SiR O . However, unlike
SIREN the attributes that store the feature vectors must be explicitly defined and handled by users. As
a consequence, if there are various feature vectors representing complementary characteristics of the
same data, they will be stored in a set of attributes to be employed in queries either individually or
combined in multiple ways. With regard to the chapter's running example, the attributes Picture_
Histo&Center and Picture_Texture must be added to the Landscapes table by the user to store respec-
tively the images' histogram together with the center pixel of the largest continuous area and the im-
ages' texture features.
Feature extraction is performed through the function generateSignature, which submits the complex
data to the respective algorithms and populates the feature vector attribute with the returned features.
The SQL block below creates the image feature vectors used in the example: (see Algorithm 17)
The second and third parameters of function generateSignature are, respectively, the names of the
attributes that hold the image and the feature vector and the last parameter is the name of the extractor.
In this example, it is considered that the Histo&Center extractor internally codes the linear combination
of the Histogram and LargestObject extractors cited in the 'A SQL Extension for Similarity Data Man-
agement' section. Note that the attributes storing the feature vectors are IN/OUT parameters. Hence, it
is necessary to select the data using an exclusive lock, expressed in the example by the FOR UPDATE
clause.
In FMI-SiR O , the association between the feature vector and the distance function to form the desired
similarity space does not need to be previously stated, as it is done in query time. This syntax allows
high flexibility, although it is prone to misuse. In FMI-SiR O , there are several distance functions, such
as the Manhattan_distance, Euclidean_distance and Canberra_distance. However, new distance functions
can be included according to application requirements. These functions can be employed to formulate
similarity queries executed using sequential scans. For example, the following two instructions execute
respectively a range query and a 5-NN query. (see Algorithm 18)where Example is a variable containing
the BLOB feature vector of the query center, 0.03 is the maximum query distance for the range query
and 5 is the number of neighbors for the k-NN query. Using standard SQL requires numbering the rows
according to the ordering criterion (the distance in similarity queries), which is used to filter the k neigh-
bors. This is done through SQL-99 window functions as showed in the example.
Algorithm 17.
SELECT Picture, Picture_Histo&Center, Picture_Texture
INTO Pic, Pic_Histo&Center, Pic_Texture
FROM Landscapes FOR UPDATE;
generateSignature(Pic, Pic_Histo&Center, 'Histo&Center');
generateSignaturePic, Pic_Texture, 'Texture');
 
Search WWH ::




Custom Search