query
17.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Generated from data/head.php, ../../smarty/{head.tpl} -->
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Query - W3C</title>
<link rel="Help" href="/Help/" />
<link rel="stylesheet" href="/2008/site/css/minimum" type="text/css" media="handheld, all" /><style type="text/css" media="print, screen and (min-width: 481px)" xml:space="preserve">
/**/
@import url("/2008/site/css/advanced");
/**/
</style><link href="/2008/site/css/minimum" rel="stylesheet" type="text/css" media="handheld, only screen and (max-device-width: 480px)" />
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="/2008/site/css/print" type="text/css" media="print" />
<link rel="shortcut icon" href="/2008/site/images/favicon.ico" type="image/x-icon" />
</head>
<body id="www-w3-org" class="w3c_public">
<div id="w3c_container">
<!-- Generated from data/mast.php, ../../smarty/{mast.tpl} -->
<div id="w3c_mast">
<!-- #w3c_mast / Page top header -->
<h1 class="logo"><a tabindex="2" accesskey="1" href="/"><img src="/2008/site/images/logo-w3c-mobile-lg" width="90" height="53" alt="W3C" /></a>
<span class="alt-logo">W3C</span></h1>
<div id="w3c_nav">
<form action="/Help/search" method="get" enctype="application/x-www-form-urlencoded">
<!-- w3c_sec_nav is populated through js -->
<div class="w3c_sec_nav">
<!-- -->
</div>
<ul class="main_nav">
<!-- Main navigation menu -->
<li class="first-item"><a href="/standards/">Standards</a></li>
<li><a href="/participate/">Participate</a></li>
<li><a href="/Consortium/membership">Membership</a></li>
<li class="last-item"><a href="/Consortium/">About W3C</a></li>
<li class="search-item">
<div id="search-form"><input tabindex="3" class="text" name="q" value="" title="Search" type="text" /> <button id="search-submit" name="search-submit" type="submit"><img class="submit" src="/2008/site/images/search-button" alt="Search" width="21" height="17" /></button></div>
</li>
</ul>
</form>
</div>
</div>
<!-- /end #w3c_mast -->
<div id="w3c_main">
<div id="w3c_logo_shadow" class="w3c_leftCol"><img height="32" alt="" src="/2008/site/images/logo-shadow" /></div>
<div class="w3c_leftCol"><h2 class="offscreen">Site Navigation</h2>
<h3 class="category"><span class="ribbon"><a href="/standards/semanticweb/" title="Up to Semantic Web">Semantic Web <img src="/2008/site/images/header-link" alt="Header link" width="13" height="13" class="header-link" /></a></span></h3>
<ul class="theme">
<li><a href="/standards/semanticweb/applications.html">Vertical Applications</a></li>
<li><a href="/standards/semanticweb/inference.html">Inference</a></li>
<li><a class="current">Query</a></li>
<li><a href="/standards/semanticweb/ontology.html">Ontologies</a></li>
<li><a href="/standards/semanticweb/data.html">Data</a></li>
</ul>
<br /></div>
<div class="w3c_mainCol">
<!-- Generated from data/crumbs.php, ../../smarty/{crumbs.tpl} -->
<div id="w3c_crumbs">
<div id="w3c_crumbs_frame">
<ul class="bct"> <!-- .bct / Breadcrumbs -->
<li class="skip"><a tabindex="1" accesskey="2" title="Skip to content (e.g., when browsing via audio)" href="#w3c_content_body">Skip</a></li>
<li><a href="/">W3C</a> <span class="cr">»</span> </li>
<li><a href="/standards/">Standards</a> <span class="cr">»</span> </li>
<li><a href="/standards/semanticweb/">Semantic Web</a> <span class="cr">»</span> </li>
<li class="current">Query</li>
</ul>
</div>
</div>
<h1 class="title">
<img src="/2008/site/images/theme-web-semantics" alt="" />Query</h1>
<ul class="w3c_toc">
<li class="toc_prefix">On this page → </li>
<li><a href="#summary">what is topic</a>
<span class="bullet">• </span>
</li>
<li><a href="#uses">what is topic used for</a>
<span class="bullet">• </span>
</li>
<li><a href="#examples">examples</a>
<span class="bullet">• </span>
</li>
<li><a href="#examples">learn more</a>
<span class="bullet">• </span>
</li>
<!--
<li><a href="#pressreleases">recent press releases</a>
<span class="bullet">• </span>
</li>
-->
<li><a href="#specifications">current status of specifications</a> and <a href="#w3c_groups">groups</a></li>
</ul>
<div class="w3c_toc">
<!-- -->
</div>
<!-- Generated from data/body_with_context.php, ../../smarty/{body_with_context.tpl} -->
<div id="w3c_content_body">
<div class="line">
<div class="unit size3on4">
<h2 id="summary">What is Query?</h2>
<p>“Query” in the Semantic Web context means technologies and protocols that can programmatically
retrieve information from the Web of Data.
</p>
<h2 id="uses">What is Query Used For?</h2>
<p>
The Semantic Web is a Web of data — of dates and titles
and part numbers and chemical properties and any other data one
might conceive of. RDF provides the foundation for publishing
and linking your data. Various technologies allow you to
embed data in documents (RDFa, GRDDL) or expose what you have
in SQL databases, or make it available as RDF files.
</p>
<p>
However, just as relational databases or XML need specific query languages (SQL and XQuery,
respectively), the Web of Data, typically represented using RDF as a data format, needs its own,
RDF-specific query language and facilities. This is provided by the SPARQLquery language and the accompanying
protocols. SPARQL makes it possible to send queries and receive results, e.g., through
HTTP or SOAP.
</p>
<p>Technically, SPARQL queries are based on <em>(triple) patterns</em>. RDF can be seen as a set of relationships
among resources (i.e., RDF triples); SPARQL queries provide one or more patterns against such relationships.
These triple patterns are similar to RDF triples, except that one or more of the constituent resource references
are variables. A SPARQL engine would returns the resources for all triples that match these patterns.</p>
<p>Using SPARQL consumers of the Web of Data can extract possibly complex information (i.e., existing resource references and
their relationships) which are returned, for example, in a table format. This table can be incorporated
into another Web page; using this approach SPARQL provides a powerful tool to build, for example, complex mash-up
sites or search engines that include data stemming from the Semantic Web.</p>
<h2 id="examples">Examples</h2>
<p>The short introduction on <a href="inference#examples">inferences</a> includes a small example
with a dataset containing the triple <tt>(Flipper isA Dolphin)</tt>. Using SPARQL the user may
issue a query of the form <tt>(Flipper isA ?species)</tt> where <tt>?species</tt> denotes a variable. The query engine
checks through the data and retrieves the value of <tt>Dolphin</tt> as a possible value for <tt>?species</tt> which
constitutes a possible answer to the query. The dataset may also contain the triple <tt>(Flipper isA Mammal)</tt>
(e.g., as a result of an <a href="inference#examples">inference</a>); in this case <tt>Mammal</tt> is also a possible
value for <tt>?species</tt> which should also be returned as a result of the query. By providing several
triple patterns, complex queries can be created and used by the application. </p>
<h2 id="learnmore">Learn More</h2>
<p>The Semantic Web community maintains a <a href="http://esw.w3.org/topic/SwBooks">list of books</a>
on a W3C Wiki page. Some of those books
are introductory in nature while others are conference proceedings or
textbook that address more advanced topics.
Details of <a href="http://www.w3.org/2007/11/Talks/Semantic_Web.html">recent and upcoming
Semantic Web related talks</a>, given by the <a href="http://www.w3.org/People/">W3C Staff</a>,
the <a href="http://www.w3.org/Consortium/Offices/">staff of the W3C Offices</a>,
and members of the W3C Working Groups are available separately; the slides
are usually publicly available. The
W3C also maintains a <a href="http://www.w3.org/2001/sw/sweo/public/UseCases/">collection of Semantic
Web Case Studies and Use Cases</a> that
show how Semantic Web technologies, including queries, are used in
practice. Finally, the <a href="/2001/sw/SW-FAQ">Semantic Web FAQ</a> may also be of help
in understanding the various concepts.</p>
<div id="pressreleases"></div>
<div id="recentpress"><!-- start generated recent press --><h2>Recent Press</h2>
<dl>
<dt>
<span class="press_date">29 December</span>
<br />
<a href="http://semanticweb.com/">semanticweb.com</a>
</dt>
<dd>
<a href="http://semanticweb.com/ring-in-a-new-year-for-the-semantic-web_b25629#more-25629">
“<cite>Ring In A New Year For the Semantic Web</cite>”
</a>
</dd>
<dt>
<span class="press_date">8 December</span>
<br />
<a href="http://blog.antidot.net/">Blog Antidot</a>
</dt>
<dd>
<a href="http://blog.antidot.net/2011/12/08/grande-semaine-pour-lopen-data-francais/">
“<cite>Grande semaine pour l’Open Data français !</cite>”
</a>
</dd>
</dl>
<!-- end generated recent press --></div>
<h2 id="specifications">Current Status of Specifications</h2>
<p>Learn more about the current status of specifications related
to:
</p>
<div id="w3c_techs_body"><ul class="show_items"><li>
<a href="/standards/techs/sparql">SPARQL</a>
</li></ul></div>
<p>These <a href="/Consortium/activities">W3C Groups</a> are
working on the related specifications:
</p>
<div id="w3c_groups"><ul class="show_items">
<li>
<a href="http://www.w3.org/2001/sw/DataAccess/">SPARQL Working Group</a>
</li>
</ul></div>
</div>
<div class="unit size1on4 lastUnit w3c_rhs">
<div id="curstatusrhs">
<h2 class="h4 category">Current Status</h2>
<ul class="theme right-side">
<li>
<a href="/standards/techs/sparql">SPARQL</a>
</li>
</ul>
</div>
<div id="useitrhs">
<h2 class="h4 category">Use It</h2>
<ul class="theme right-list">
<li class="tutorials_link">Tutorials</li>
<li>Business Case</li>
<li>Software</li>
</ul>
</div>
<div id="validatorsrhs">
<!-- -->
</div>
<div id="logosrhs">
<h2 class="h4 category">Logos</h2>
<ul class="theme right-list">
<li>
<a href="http://www.w3.org/2007/10/sw-logos.html#sw-sparql">SPARQL</a>
</li>
</ul>
</div>
</div>
<!-- /end #contextnav -->
</div>
</div>
</div>
</div>
</div>
<!-- Generated from data/footer.php, ../../smarty/{footer-block.tpl} -->
<div id="w3c_footer">
<div id="w3c_footer-inner">
<h2 class="offscreen">Footer Navigation</h2>
<div class="w3c_footer-nav">
<h3>Navigation</h3>
<ul class="footer_top_nav">
<li><a href="/">Home</a></li>
<li><a href="/standards/">Standards</a></li>
<li><a href="/participate/">Participate</a></li>
<li><a href="/Consortium/membership">Membership</a></li>
<li class="last-item"><a href="/Consortium/">About W3C</a></li>
</ul>
</div>
<div class="w3c_footer-nav">
<h3>Contact W3C</h3>
<ul class="footer_bottom_nav">
<li><a href="/Consortium/contact">Contact</a></li>
<li><a accesskey="0" href="/Help/">Help and FAQ</a></li>
<li><a href="/Consortium/sponsor/">Sponsor / Donate</a></li>
<li><a href="/Consortium/siteindex">Site Map</a></li>
<li>
<address id="w3c_signature"><a href="mailto:site-comments@w3.org">Feedback</a> (<a href="http://lists.w3.org/Archives/Public/site-comments/">archive</a>)
</address>
</li>
</ul>
</div>
<div class="w3c_footer-nav">
<h3>W3C Updates</h3>
<ul class="footer_follow_nav">
<li><a href="http://twitter.com/W3C" title="Follow W3C on Twitter"><img src="/2008/site/images/twitter-bird" alt="Twitter" width="78" height="83" class="social-icon" /></a> <a href="http://identi.ca/w3c" title="See W3C on Identica"><img src="/2008/site/images/identica-logo" alt="Identica" width="91" height="83" class="social-icon" /></a></li>
</ul>
</div>
<!-- #footer address / page signature -->
<p class="copyright">Copyright © 2012 W3C <sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
<a href="http://www.keio.ac.jp/">Keio</a>) <a href="/Consortium/Legal/ipr-notice">Usage policies
apply</a>.
</p>
</div>
</div>
<!-- /end #footer -->
<!-- Generated from data/scripts.php, ../../smarty/{scripts.tpl} -->
<div id="w3c_scripts"><script type="text/javascript" src="/2008/site/js/main" xml:space="preserve"><![CDATA[
//
<!-- -->
//
]]></script></div>
</body>
</html>