PDF version of this report
You must have Adobe Acrobat reader to view, save, or print PDF files. The reader
is available for free
download.
ARCHIVED REPORT:
Web Ontology Language
& SPARQL Query Language
Copyright 2014, Faulkner
Information Services. All Rights Reserved.
Docid: 00011563
Publication Date: 1408
Report Type: TUTORIAL
Preview
SPARQL
and the Web Ontology Language (OWL) are standards that support the
semantic Web, which proposes to replace unstructured data with
information whose meaning can be processed by software applications.
With the semantic Web now evolving from a concept into a reality, SPARQL and OWL
are slowly expanding beyond the domain of developers to the commercial
world. Stakeholders interested in the practical
applications of these standards may want to begin investigating them as
development on the semantic Web continues to push forward.
Report Contents:
Executive Summary
[return to top
of this report]
The Web Ontology
Language (or OWL, chosen over “WOL” as a more appealing abbreviation)1
and the self-reflexively named SPARQL Protocol and RDF Query Language
(SPARQL) play key roles in the developing semantic Web, which aims to
allow Web files to be machine-processed based on the meaning and type
of their content.
OWL provides a system for
sorting and labeling information, and it is an alternative to the
Resource Description Framework, or RDF.
SPARQL (pronounced “sparkle”)
is the query language to be used for searching semantic Web content.
The semantic Web has progressed steadily over the past few years, and it has in part moved
from the developmental stage to real world use. Organizations and IT
professionals in sectors that are (or soon will be) affected by the
semantic Web, such as e-commerce and database management, should begin
to study the topic at a strategic level. Organizations in many other
sectors may investigate the semantic Web as resources permit.
Description
[return to top of this report]
To understand the Web
Ontology Language (OWL) and SPARQL Protocol and RDF Query Language
(SPARQL), it is first necessary to understand the semantic Web, for
which they were designed. The semantic Web aims to create the standards
and syntaxes for a type of Web page that would categorize online text
based on the type of content it represents. This differs sharply from
the type of Web page common today. On an ordinary HTML page, words
representing company names, people’s names, titles, and so on cannot
be categorized by an application. From the application’s perspective,
“John Smith & Son” as a company name is in the
same category as “John Smith and his son” as a phrase describing two
people.
The appeal of the
emerging semantic
Web is largely its ability to facilitate better, more customized
searches and to improve content management. In short, it enables Web
information to be managed like data in a database rather than as
unstructured raw text. But delivering these business benefits to users
requires the development and acceptance of some new standards,
including a query language and a way to describe relationships among
data items.
The descriptive
schema
that has been developed for the semantic Web is the Resource
Description Framework (RDF), a W3C standard that covers the labeling
and description of data. OWL is an alternative to RDF that is intended
for use when more flexibility is needed. SPARQL is the semantic Web’s
query language.
OWL
A W3C
working group created OWL 2, which slightly changed and added to
OWL.2 A
review of the changes in OWL 2, along with other semantic Web
developments, is available in a talk given by the W3C’s Ivan Herman.3
OWL 2 has three
profiles
that
function as “trimmed down” sublanguages that are more efficient for
certain types of tasks:4
- OWL
2 EL, for “ontologies
that contain very large numbers,” - OWL 2 QL, for applications
with “large volumes of instance data,” - OWL 2 RL, for “applications
that require scalable reasoning.”
The sublanguages of
the
first
version of OWL — OWL Lite and OWL DL — have not seen extensive use.
SPARQL
SPARQL is the de facto
standard query language for searching RDF documents on the semantic
Web. SPARQL is designed to be a query language specifically for RDF,
including data that is in itself stored in RDF form or data that is
viewed indirectly in RDF form.
As described by IBM, a
SPARQL query representing the English sentence “Find the URL of the
blog by the person named Jon Foobar” would be represented as:
PREFIX foaf:
<http://xmlns.com/foaf/0.1/>
SELECT ?url
FROM <bloggers.rdf>
WHERE {
?contributor foaf:name “Jon Foobar” .
?contributor foaf:weblog ?url .
}5
Yahoo! software
architect Dave
Beckett summarizes the structure of SPARQL as follows:6
Prologue (optional) | BASE <iri> |
PREFIX prefix: <iri> (repeatable) |
|
Query Result forms (required, pick 1) |
SELECT (DISTINCT )sequence of ?variable |
SELECT (DISTINCT)* | |
DESCRIBE sequence of ?variable or <iri> |
|
DESCRIBE * | |
CONSTRUCT { graph pattern } |
|
ASK | |
Query Dataset Sources (optional) |
Add triples to the background graph (repeatable): |
FROM <iri> | |
Add a named graph (repeatable): |
|
FROM NAMED <iri> |
|
Graph Pattern (optional, required for ASK) |
WHERE { graph pattern [ FILTER expression ]} |
Query Results Ordering (optional) |
ORDER BY … |
Query Results Selection (optional) |
LIMIT n, OFFSET m |
Outlook
[return to top of this report]
The fates of OWL and SPARQL are tightly intertwined with the future of the semantic Web. And
that future is still taking shape. Open questions include the following:
- Will the semantic Web achieve broad adoption? If so, when?
- If the semantic Web does achieve broad adoption, just how extensively will it be used?
- What form will the final version of the semantic Web take?
- Will the current standards used with the semantic Web remain or be replaced?
The semantic Web may take
unexpected turns in its continuing development process, and its
eventual design may replace or minimize the roles of OWL and SPARQL.
Even if the semantic Web does establish a permanent place for itself as
a tool for users at large, it could still be a specialty offering used
for only a limited range of needs. Even optimistic estimates do not
expect the semantic Web to burst into broad use in the next few years,
and some observers are skeptical that the semantic Web will be widely
used even in the future.
But the development of
semantic Web building blocks has now progressed to the point at which
real-world business projects are achievable. With this foundation set,
small numbers of projects that can serve as models to other developers
are emerging, albeit slowly.
Recommendations
[return to top of this report]
Embarking on a semantic
Web project is not an easy or quick task. There are many development
protocols and approaches to understand. Before studying
sub-topics such as SPARQL and OWL, it will be beneficial to first
consider the semantic Web as a whole, starting with business
considerations and moving on to technical considerations. Figure 1
below
describes a roadmap for an organization to follow as it evaluates how
to approach the semantic Web.
Figure
1. Semantic Web Roadmap
(Note that the study of
RDF and OWL may be iterative. OWL is an alternative to RDF that
provides more flexibility. People interested in the semantic Web can
compare the two before moving forward.)
Many organizations will
find that they do not need to seriously address the semantic Web at
this time. But organizations in certain sectors will need to pay close
attention sooner rather than later. In particular, Web developers
should begin to educate themselves on both OWL and SPARQL. Web
developers engaged in advanced e-commerce and data management
technologies will have a stronger impetus to study the semantic Web
than developers focused on HTML-centric sites.
Database
administrators and developers could also benefit from studying SPARQL,
which is a query language like those used in some databases. Oracle has
built support for SPARQL-like queries into its database,
perhaps
signaling greater use to come throughout the sector.
Web Links
[return to top of this report]
- Oracle: http://www.oracle.com/
- OWL 2: http://www.w3.org/TR/owl2-syntax/
- OWL Working Group: http://www.w3.org/2007/OWL/wiki/OWL_Working_Group
- Resource Description Framework (RDF): http://www.w3.org/RDF/
- World Wide Web Consortium (W3C): http://www.w3.org/
References
- 1W3C. Frequently asked
questions on W3C’s Web Ontology Language (OWL). Available online at:
http://www.w3.org/2003/08/owlfaq - 2
Semanticweb.org. Entry on Owl 2. Available online at:
http://semanticweb.org/wiki/OWL_2
3 Herman, I. A year on the
Semantic Web @ W3C. Jun 10. Available online at:
http://www.w3.org/2010/Talks/0617-Seattle-IH/
4 W3C. OWL 2 web ontology
language: Profiles. Oct 09. Available online at:
http://www.w3.org/TR/owl2-profiles/- 5
IBM. Search RDF data with SPARQL. May 05. - 6
Beckett, D. SPARQL RDF query language reference v. 1.7. 05. Available
online at:http://www.dajobe.org/2005/04-sparql/SPARQLreference-1.7.pdf
About the Author
[return to top of this report]
Geoff Keston is the author of more
than 250 articles that help organizations find opportunities in
business trends and technology. He also works directly with clients to
develop communications strategies that improve processes and customer
relationships. Mr. Keston has worked as a project manager for a major
technology consulting and services company and is a Microsoft Certified
Systems Engineer and a Certified Novell Administrator.
return to top of this report]