Versa (query language)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
This article is about query language. For vehicle, see Nissan Versa.

Versa is an RDF query language, that is, a query language for databases, able to retrieve and manipulate data stored in Resource Description Framework (RDF) format. Versa differs from most other RDF query languages, which are typically based on SQL or specialized XML vocabularies. Although the design of Versa was inspired by XPath, its compact, functional syntax also somewhat resembles Lisp. As of 2006, the only Versa implementation is in the Python-language, open source 4Suite XML framework.

History and status[edit]

Versa's origins can be traced to 2000, when professional XML consultancy Fourthought, Inc. began developing RIL, an open, XML-based RDF Inference Language. RIL was implemented briefly in Fourthought's 4Suite Server product, which allowed for persistent storage and querying of an RDF model and associated XML document store.

In October 2001, the query portion of RIL was spun off into a separate project named Versa, with the intent that after Versa stabilized, development would resume to establish RIL as a formal language for working Versa query results. RIL development never resumed, however; inference abilities in 4Suite were easily handled by XSLT extensions and did not need a separate language.

Versa initially had limits that required the language to be redesigned. The overhaul was performed in late 2001 and early 2002 by software engineers from Sun Microsystems and Fourthought, to facilitate internal knowledge management applications at Sun and to drive applications that were in development for Fourthought's other clients. 4Suite's Versa library was used as the reference implementation, and a draft specification was published.

Versa development slowed in 2002, although Sun and Fourthought continued to work together to develop Versa based applications through 2004. In mid-2005, Chimezie Ogbuji and Daniel Krech began planning to fold the abilities of 4Suite's outdated RDF libraries (4RDF), including Versa support, into RDFLib, which offers complementary features and would allow Versa to be used independently of 4Suite. This coincided with renewed interest in refining the Versa draft specification and publishing a "1.0" version.

As of 2006, the development of Versa is being coordinated primarily by Chimezie and Uche Ogbuji of Fourthought.

Syntax examples[edit]

Get the URIs of all known resources:

all()

Get the URIs of all known instances of type edu:Subject:

type(edu:Subject)

Get the rdfs:labels of all edu:Subjects having one or more rdfs:label:

type(edu:Subject) - rdfs:label -> *

Get the URIs of all edu:Subjects having a rdfs:label matching "Russian language":

type(edu:Subject) |- rdfs:label -> eq("Russian language")

Get the URIs of all "super-edu:Subjects" (transitively) of the edu:Subject identified by "http://en.wikipedia.org/wiki/Russian_language":

traverse(@"http://en.wikipedia.org/wiki/Russian_language",
         @"http://example.com/education#subTopicOf",
         vtrav:forward, vtrav:transitive)

External links[edit]