1 / 12

Proposal for a Query Language A CQL extension

This document proposes a robust extension for the Common Query Language (CQL) aimed at improving its compatibility with hierarchical metadata structures. The proposal highlights key terminologies such as search terms and indexing conventions, exemplified by queries that target specific document attributes like title and ISBN. It illustrates how to structure queries to retrieve documents based on various criteria, ensuring they conform to defined hierarchies within metadata. This extension seeks to address limitations of the current CQL framework, promoting more effective information retrieval.

kailey
Download Presentation

Proposal for a Query Language A CQL extension

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Proposal for a Query Language A CQL extension Stefaan Ternier - K.U.Leuven/Ariadne/Prolearn http://www.cs.kuleuven.ac.be/~stefaan Polimi, Italy

  2. creativecommons.org Polimi, Italy

  3. Mappings – basic idea Eg. dc.title = “milano meeting” and dc.type = “image” ? Query? Result source target <lom><general>..</general>..</lom> Polimi, Italy

  4. CQL - Terminology • Search term • may be enclosed in double quotes • must be enclosed with double quotes if contains a search term contains < > = / ( ) or whitespace • Example • Bird • “milano meeting” • Search Clause • Consists of • Index/relation/search term • Search term only • Example: • title = “milano meeting” (Index/relation/search term) • “milano meeting” (equivalent to srw.serverChoice = “milano meeting”) Polimi, Italy

  5. CQL - Terminology • Index • [[Index name] Fieldname] • Example • dc.title • title • Disadvantage • Current structure -> flatworks only key – value pairs<-> LOM = hierarchical Polimi, Italy

  6. CQL - Proposal • Make it suit for hierarchical metadata structures • Revisit Index • [[index name] [path elements]* Fieldname] • Example • lom.general.identifier.title • lom.technical.size • .technical.size • size • dc.title • context.environment.os Polimi, Italy

  7. Queries • List documents with a filesize less than 2kb, that have an ISBN number and that have an identifier equal to “0-306-40615”. • List documents with a filesize less than 2kb and that have an ISBN that is equal to “0-306-40615”. <lom> <general> <identifier> <catalog>ISBN</catalog> <entry>0-306-40615</entry> </identifier> <identifier> <catalog>ariadne</catalog> <entry>123456789</entry> </identifier> </general> <technical> <size>299</size> </technical></lom> <lom> <general> <identifier> <catalog>ISBN</catalog> <entry>0-111-22222</entry> </identifier> <identifier> <catalog>ariadne</catalog> <entry>0-306-40615</entry> </identifier> </general> <technical> <size>299</size> </technical></lom> Matches query 1 & 2 Matches query 1 Polimi, Italy

  8. Queries -issues • List documents with a filesize less than 2kb, that have an ISBN number and that have an identifier equal to “0-306-40615”.lom.technical.size < 2000 lom.general.identifier.catalog = “ISBN” andlom.general.identifier.entry = “0-306-40615” • List documents with a filesize less than 2kb and that have an ISBN that is equal to “0-306-40615”.? • List documents have a contributor that has Erik as first name and Ternier as last name. ? Proposal: introduce an XPath like solutionlom.technical.size < 2000 and lom.general.identifier.(catalog = “ISBN” and entry = “0-306-40615) Polimi, Italy

  9. <lom> <general> <identifier> <catalog>ISBN</catalog> <entry>0-306-40615</entry> </identifier> <identifier> <catalog>ariadne</catalog> <entry>123456789</entry> </identifier> </general> <technical> <size>29999</size> </technical></lom> <lom> <general> <identifier> <catalog>ISBN</catalog> <entry>0-111-22222</entry> </identifier> <identifier> <catalog>ariadne</catalog> <entry>0-306-40615</entry> </identifier> </general> <technical> <size>29999</size> </technical></lom> Polimi, Italy

  10. <lom> <general> <identifier> <catalog>ISBN</catalog> <entry>0-306-40615</entry> </identifier> <identifier> <catalog>ariadne</catalog> <entry>123456789</entry> </identifier> </general> <technical> <size>29999</size> </technical></lom> <lom> <general> <identifier> <catalog>ISBN</catalog> <entry>0-111-22222</entry> </identifier> <identifier> <catalog>ariadne</catalog> <entry>0-306-40615</entry> </identifier> </general> <technical> <size>29999</size> </technical></lom> Polimi, Italy

  11. XQuery:<results> { for $lom in doc("data/something.xml")/lom where( some $general in $lom/general satisfies $general/identifier/catalog/text() = "ISBN" and $general/identifier/entry/text() = "0-306-40615" and $lom/technical/Size/text() <2000 ) return $lom } </results> lom.general.(identifier.catalog = “ISBN” and identifier.entry = “0-306-40615) andlom.technical.size < 2000 Polimi, Italy

  12. XQuery: <results> { for $lom in doc("data/something.xml")/lom where( some $identifier in $lom/general/identifier satisfies $identifier/catalog/text() = "ISBN" and $identifier/entry/text() = 123456789 and $lom/technical/Size/text() <2000 ) return $lom } </results> lom.general.identifier(catalog = “ISBN” and entry = “0-306-40615) andlom.technical.size < 2000 Polimi, Italy

More Related