Textual and Visual for Content-based Image Re- 5.2 Data Preparation 5.3 Query Processing 5.3.2 Subquery Processing 4.1 Webssql Syntax Query := Select Targetattr from Tablelist Where Conditions] With-size Size]
of quadruplets (Webpages.url, Webpages..le id, Images .image id, Images.description) will be obtained. For each quadruplet, a triplet (Webpages.url, Web-pages..le id, Images.image id) are extracted and the set of triplets is used by the next step for assembling the nal result. The fourth component of each quadruplet (i.e., Images.description) will be extracted and be used by subquery q3. Subquery q2 is a query against a collection of web pages. This is exactly the kind of query seen in most search engines and in traditional document retrieval systems 24]. The standard approach for evaluating such a query is to use the inverted le index for the document collection 24, 28]. The result of evaluating q2 is a set of pairs (Web-pages..le id, similarity), where similarity > 0 is the similarity of the web page identiied by the le id with the query (the description following \text similar to"). This set of pairs will be used by the next step for assembling the nal result. Subquery q3 is processed after subquery q1 has been processed. A beneet of this evaluation order is that only image descriptions whose corresponding image ids are returned by q1 need to be used to process q3. Note that there is no inverted le index for the descriptions of images. As a result, the similarities between the image descriptions returned by q1 and the image description in the query have to be computed one by one. The evaluation of q3 produces a set of pairs (Images.image id, similarity), where similarity > 0 is the similarity of the description of the image identiied by the image id with the image description in the user query. Again, this set of pairs will be used by the next step for assembling the nal result. As described above, the result of evaluating q1 is a set of triplets (Webpages.url, Webpages..le id, Images .image id), the result of evaluating q2 is a set of pairs (Webpages..le id, similarity), and the result of evaluating q3 is a set of pairs (Images.image id, similarity). We now discuss how to generate the nal result to the user query from these triplets and pairs. The result assembling is accomplished by the following algorithm. 1. Sort the triplet le based on the url eld. Sort the two pair les based on the le id and the image id elds, respectively. 2. For each triplet, say (url 1 , w …