RDQL
   HOME

TheInfoList



OR:

An RDF query language is a
computer language A computer language is a formal language used to communicate with a computer. Types of computer languages include: * Construction language – all forms of communication by which a human can specify an executable problem solution to a compu ...
, specifically a
query language Query languages, data query languages or database query languages (DQL) are computer languages used to make queries in databases and information systems. A well known example is the Structured Query Language (SQL). Types Broadly, query language ...
for
database In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases sp ...
s, able to retrieve and manipulate data stored in
Resource Description Framework The Resource Description Framework (RDF) is a World Wide Web Consortium (W3C) standard originally designed as a data model for metadata. It has come to be used as a general method for description and exchange of graph data. RDF provides a variety of ...
(RDF) format.
SPARQL SPARQL (pronounced "sparkle" , a recursive acronym for SPARQL Protocol and RDF Query Language) is an RDF query language—that is, a semantic query language for databases—able to retrieve and manipulate data stored in Resource Description F ...
has emerged as the standard RDF query language, and in 2008 became a
W3C recommendation The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working to ...
.


Query language properties

Properties relevant to RDF query language design include support for the RDF format: * Support for RDF data, which is a collection of triples that form the RDF graph * Support for RDF semantics and inference that allows for entailment, the reasoning about the meaning of RDF graphs * Support for schema data types, such as
XML schema An XML schema is a description of a type of Extensible Markup Language, XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic syntactical constraints imposed ...
and for desirable language features: * Expressiveness: the power of query expression that may be constructed * Closure: data operations on an RDF graph should result in another RDF graph * Orthogonality: data operations are independent of the context in which they are used * Safety: every expression returns a finite set of results.


Query language families

RDF query languages can be grouped into language families, each family comprising a set of closely related languages. The SPARQL family of languages includes SquishQL, RDQL, SPARQL, and TriQL. These languages treat RDF data stores as triple stores that do not necessarily have ontology or schema information associated with them. Members of the SPARQL family are considered relational query languages because they have relational or pattern-based operations. SquishQL was a language constructed to be easy to use and similar in structure to SQL. RDQL, an acronym for RDF Data Query Language, was a further development of SquishQL. RDQL was intended to be a simple low level RDF language and was at one point a candidate for W3C standardization. SPARQL is an extension of RDQL that supports extraction of RDF subgraphs. In 2008, SPARQL 1.0 became a W3C recommendation and SPARQL 1.1 became a W3C recommendation in 2013. The RQL family of languages includes RQL, SeRQL, and eRQL. These languages support querying of both data and schema. RQL, an acronym for RDF Query Language, is known for using types defined in
RDF schema RDF Schema (Resource Description Framework Schema, variously abbreviated as RDFS, , RDF-S, or RDF/S) is a set of classes with certain properties using the RDF extensible knowledge representation data model, providing basic elements for the descr ...
s (RDFS) to query the schema class hierarchy and to support data querying by type. RQL is considered more expressive than the SPARQL family of languages, but has been criticized for too many features and unusual syntactic constructs. SeRQL and eRQL were developed as simplified alternatives to RQL. There is a family of RDF query languages inspired by XML query technology. XQuery for RDF uses the XML query language
XQuery XQuery (XML Query) is a query and functional programming language that queries and transforms collections of structured and unstructured data, usually in the form of XML, text and with vendor-specific extensions for other data formats (JSON, bin ...
to query RDF data by serializing RDF into an XML format and then using XQuery on the result; this has been called the "syntactic web approach". TreeHugger and RDF Twig use
XSLT XSLT (Extensible Stylesheet Language Transformations) is a language originally designed for transforming XML documents into other XML documents, or other formats such as HTML for web pages, plain text or XSL Formatting Objects, which may subseque ...
to query RDF data. Versa by 4Suite is a query language that drew inspiration from
XPath XPath (XML Path Language) is an expression language designed to support the query or transformation of XML documents. It was defined by the World Wide Web Consortium (W3C) and can be used to compute values (e.g., strings, numbers, or Boolean v ...
. There exist RDF query languages based on other principles. Metalog combines querying with reasoning and has an English like syntax. Algae is a query language developed by the W3C that adds reactive rules, also called actions, that determine for instance whether an Algae expression is a data query or a data update. Other examples of RDF Query languages include RDFDBQL.


Example

select ?uri,?name, ?lat, ?lon from where (?city, , ?name), (?city, ,?uri), (?city, , ?lat), (?city, , ?lon) using rdfs FOR , pos FOR , doilair FOR , vcard FOR


Related languages

Other languages which can query RDF data include: * DQL,
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable ...
-based, queries and results expressed in DAML+OIL *
XUL XUL ( ), which stands for XML User Interface Language, is a user interface markup language developed by Mozilla. XUL is an XML dialect for writing graphical user interfaces, enabling developers to write user interface elements in a manner sim ...
has
template
element in which to declare rules for matching data in RDF.
XUL XUL ( ), which stands for XML User Interface Language, is a user interface markup language developed by Mozilla. XUL is an XML dialect for writing graphical user interfaces, enabling developers to write user interface elements in a manner sim ...
uses RDF extensively for databinding. *
Adenine Adenine () ( symbol A or Ade) is a nucleobase (a purine derivative). It is one of the four nucleobases in the nucleic acid of DNA that are represented by the letters G–C–A–T. The three others are guanine, cytosine and thymine. Its derivati ...
(programming language written in RDF).
XQuery XQuery (XML Query) is a query and functional programming language that queries and transforms collections of structured and unstructured data, usually in the form of XML, text and with vendor-specific extensions for other data formats (JSON, bin ...
, or XML Query, is a standard query language for XML documents. Graph query languages, such as
Cypher Query Language Cypher is a declarative graph query language that allows for expressive and efficient data querying in a property graph. Cypher was largely an invention of Andrés Taylor while working for Neo4j, Inc. (formerly Neo Technology) in 2011. Cypher was ...
,
GraphQL GraphQL is an open-source data query and manipulation language for APIs, and a runtime for fulfilling queries with existing data. GraphQL was developed internally by Facebook (now Meta) in 2012 before being publicly released in 2015. On 7 Nov ...
, and
Gremlin A gremlin is a mischievous folkloric creature invented at the beginning of the 20th century to originally explain malfunctions in aircraft and later in other machinery and processes and their operators. Depictions of these creatures vary widel ...
, are designed to query
graph database A graph database (GDB) is a database that uses graph structures for semantic queries with nodes, edges, and properties to represent and store data. A key concept of the system is the ''graph'' (or ''edge'' or ''relationship''). The graph relat ...
s, of which RDF data stores are an example. The Topic Map Query Language (TMQL) is a query language for
topic maps A topic map is a standard for the representation and interchange of knowledge, with an emphasis on the findability of information. Topic maps were originally developed in the late 1990s as a way to represent back-of-the-book index structures s ...
, a data representation similar to but more general than RDF.


References

{{Reflist


External links


RDF Query specification

RDF query language survey
*
A Comparison of (some) RDF Query Languages

RDF query use cases, including query language samples

SparQL
RDF data access
Query languages Query languages, data query languages or database query languages (DQL) are computer languages used to make queries in databases and information systems. A well known example is the Structured Query Language (SQL). Types Broadly, query language ...
Query languages