ArticleslgStudy

science

RDF query language

RDF query language is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand RDF query language rather than just read about it. In short: An RDF query language is a computer language, specifically a query language for databases, able to retrieve and manipulate data stored in Resource Description Framework (RDF) format. SPARQL has emerged as the standard RDF query language, and in 2008 became a W3C recommendation.

Key takeaways

  • RDF query language belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect RDF query language to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of RDF query language from memory before moving on to harder problems.

Reference excerpt

An RDF query language is a computer language, specifically a query language for databases, able to retrieve and manipulate data stored in Resource Description Framework (RDF) format. SPARQL has emerged as the standard RDF query language, and in 2008 became a W3C recommendation.

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 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 schemas (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 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 to query RDF data. Versa by 4Suite is a query language that drew inspiration from XPath. 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

Related languages Other languages which can query RDF data include:

DQL, XML-based, queries and results expressed in DAML+OIL XUL has a template element in which to declare rules for matching data in RDF. XUL uses RDF extensively for databinding. Adenine (programming language written in RDF). XQuery, or XML Query, is a standard query language for XML documents. Graph query languages, such as Cypher Query Language, GraphQL, and Gremlin, are designed to query graph databases, of which RDF data stores are an example. The Topic Map Query Language (TMQL) is a query language for topic maps, a data representation similar to but more general than RDF.

References

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

Worked examples

Example 1 — a first encounter with RDF query language

Start with the simplest possible case. Write down what RDF query language claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to RDF query language before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about RDF query language ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of RDF query language

In research
RDF query language appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses RDF query language in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
RDF query language is common in secondary-school and first-year university syllabi. It links to neighbouring topics Query languages, RDF data access, Resource Description Framework, so understanding it makes those chapters shorter.
In everyday life
Look for RDF query language outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study RDF query language in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what RDF query language means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain RDF query language out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is RDF query language in simple terms?

An RDF query language is a computer language, specifically a query language for databases, able to retrieve and manipulate data stored in Resource Description Framework (RDF) format. SPARQL has emerged as the standard RDF query language, and in 2008 became a W3C recommendation.

Why does RDF query language matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study RDF query language?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on RDF query language.

Tags

  • Query languages
  • RDF data access
  • Resource Description Framework

Keep exploring