SPARQL 20.2 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<meta name="generator" content="MediaWiki 1.15.5" />
		<meta name="keywords" content="SPARQL,4store,ARC,AllegroGraph,Anzo,Asio,Bigdata,Books,CWM,ClioPatria,Corese" />
		<link rel="shortcut icon" href="/favicon.ico" />
		<link rel="search" type="application/opensearchdescription+xml" href="/2001/sw/wiki/opensearch_desc.php" title="Semantic Web Standards (en)" />
		<link rel="alternate" type="application/rss+xml" title="Semantic Web Standards RSS feed" href="/2001/sw/wiki/index.php?title=Special:RecentChanges&amp;feed=rss" />
		<link rel="alternate" type="application/atom+xml" title="Semantic Web Standards Atom feed" href="/2001/sw/wiki/index.php?title=Special:RecentChanges&amp;feed=atom" />
		<title>SPARQL - Semantic Web Standards</title>
		<link rel="stylesheet" href="/2001/sw/wiki/skins/common/shared.css?207" type="text/css" media="screen" />
		<link rel="stylesheet" href="/2001/sw/wiki/skins/common/commonPrint.css?207" type="text/css" media="print" />
		<link rel="stylesheet" href="/2001/sw/wiki/skins/w3cmonobook/main.css?207" type="text/css" media="screen" />
		<!--[if lt IE 5.5000]><link rel="stylesheet" href="/2001/sw/wiki/skins/w3cmonobook/IE50Fixes.css?207" type="text/css" media="screen" /><![endif]-->
		<!--[if IE 5.5000]><link rel="stylesheet" href="/2001/sw/wiki/skins/w3cmonobook/IE55Fixes.css?207" type="text/css" media="screen" /><![endif]-->
		<!--[if IE 6]><link rel="stylesheet" href="/2001/sw/wiki/skins/w3cmonobook/IE60Fixes.css?207" type="text/css" media="screen" /><![endif]-->
		<!--[if IE 7]><link rel="stylesheet" href="/2001/sw/wiki/skins/w3cmonobook/IE70Fixes.css?207" type="text/css" media="screen" /><![endif]-->
		<link rel="stylesheet" href="/2001/sw/wiki/index.php?title=MediaWiki:Common.css&amp;usemsgcache=yes&amp;ctype=text%2Fcss&amp;smaxage=18000&amp;action=raw&amp;maxage=18000" type="text/css" />
		<link rel="stylesheet" href="/2001/sw/wiki/index.php?title=MediaWiki:Print.css&amp;usemsgcache=yes&amp;ctype=text%2Fcss&amp;smaxage=18000&amp;action=raw&amp;maxage=18000" type="text/css" media="print" />
		<link rel="stylesheet" href="/2001/sw/wiki/index.php?title=MediaWiki:W3cmonobook.css&amp;usemsgcache=yes&amp;ctype=text%2Fcss&amp;smaxage=18000&amp;action=raw&amp;maxage=18000" type="text/css" />
		<link rel="stylesheet" href="/2001/sw/wiki/index.php?title=-&amp;action=raw&amp;maxage=18000&amp;gen=css" type="text/css" />
		<!--[if lt IE 7]><script type="text/javascript" src="/2001/sw/wiki/skins/common/IEFixes.js?207"></script>
		<meta http-equiv="imagetoolbar" content="no" /><![endif]-->

		<script type= "text/javascript">/*<![CDATA[*/
		var skin = "w3cmonobook";
		var stylepath = "/2001/sw/wiki/skins";
		var wgArticlePath = "/2001/sw/wiki/$1";
		var wgScriptPath = "/2001/sw/wiki";
		var wgScript = "/2001/sw/wiki/index.php";
		var wgVariantArticlePath = false;
		var wgActionPaths = {};
		var wgServer = "http://www.w3.org";
		var wgCanonicalNamespace = "";
		var wgCanonicalSpecialPageName = false;
		var wgNamespaceNumber = 0;
		var wgPageName = "SPARQL";
		var wgTitle = "SPARQL";
		var wgAction = "view";
		var wgArticleId = "73";
		var wgIsArticle = true;
		var wgUserName = null;
		var wgUserGroups = null;
		var wgUserLanguage = "en";
		var wgContentLanguage = "en";
		var wgBreakFrames = false;
		var wgCurRevisionId = 1374;
		var wgVersion = "1.15.5";
		var wgEnableAPI = true;
		var wgEnableWriteAPI = true;
		var wgSeparatorTransformTable = ["", ""];
		var wgDigitTransformTable = ["", ""];
		var wgRestrictionEdit = [];
		var wgRestrictionMove = [];
		/*]]>*/</script>

		<script type="text/javascript" src="/2001/sw/wiki/skins/common/wikibits.js?207"><!-- wikibits js --></script>
		<!-- Head Scripts -->
		<script type="text/javascript" src="/2001/sw/wiki/skins/common/ajax.js?207"></script>
		<link rel="alternate" type="application/rdf+xml" title="SPARQL" href="/2001/sw/wiki/index.php?title=Special:ExportRDF/SPARQL&amp;xmlmime=rdf" />
		<script type="text/javascript" src="/2001/sw/wiki/index.php?title=-&amp;action=raw&amp;gen=js&amp;useskin=w3cmonobook"><!-- site js --></script>
	</head>
<body class="mediawiki ltr ns-0 ns-subject page-SPARQL skin-w3cmonobook">
	<div id="globalWrapper">
		<div id="column-content">
	<div id="content">
		<a id="top"></a>
				<h1 id="firstHeading" class="firstHeading">SPARQL</h1>
		<div id="bodyContent">
			<h3 id="siteSub">From Semantic Web Standards</h3>
			<div id="contentSub"></div>
									<div id="jump-to-nav">Jump to: <a href="#column-one">navigation</a>, <a href="#searchInput">search</a></div>			<!-- start content -->
			<table style="background: #eeeeee; margin-bottom:2em; margin-right:1em; float:right">

<tr>
<td> <span style="float:right"><img src="http://www.w3.org/Icons/SW/Buttons/sw-sparql-blue.png" alt="sw-sparql-blue.png" /></span>
</td></tr>
<tr>
<td>
<ul><li> Publication date: 2008-01-15   
</li><li> Created by:  <a href="http://www.w3.org/2001/sw/#sparql" class="external text" title="http://www.w3.org/2001/sw/#sparql" rel="nofollow">SPARQL Working Group</a>
</li><li> List of documents at: <a href="http://www.w3.org/standards/techs/sparql" class="external free" title="http://www.w3.org/standards/techs/sparql" rel="nofollow">http://www.w3.org/standards/techs/sparql</a> 
</li></ul>
</td></tr></table>
<a name="SPARQL_Query_Language_for_RDF" id="SPARQL_Query_Language_for_RDF"></a><h1> <span class="mw-headline"> SPARQL Query Language for RDF </span></h1>
<a name="Overview" id="Overview"></a><h2> <span class="mw-headline"> Overview </span></h2>
<p><a href="/2001/sw/wiki/RDF" title="RDF">RDF</a> is a directed, labeled graph data format for representing information in the Web. This specification defines the syntax and semantics of the SPARQL query language for RDF. SPARQL can be used to express queries across diverse data sources, whether the data is stored natively as <a href="/2001/sw/wiki/RDF" title="RDF">RDF</a> or viewed as <a href="/2001/sw/wiki/RDF" title="RDF">RDF</a> via middleware. SPARQL contains capabilities for querying required and optional graph patterns along with their conjunctions and disjunctions. SPARQL also supports extensible value testing and constraining queries by source <a href="/2001/sw/wiki/RDF" title="RDF">RDF</a> graph. The results of SPARQL queries can be results sets or <a href="/2001/sw/wiki/RDF" title="RDF">RDF</a> graphs.
</p><p>Note that the Working Group is currently working on a 1.1 version of SPARQL.
</p>
<a name="Recommended_Reading" id="Recommended_Reading"></a><h2> <span class="mw-headline"> Recommended Reading </span></h2>
<p>A number of textbooks have been published on <a href="/2001/sw/wiki/RDF" title="RDF">RDF</a>, RDFS, and on Semantic Web in general. Please, refer to a <a href="/2001/sw/wiki/Books" title="Books">separate page</a> listing some of those, as maintained by the community. That list also includes references to conference proceedings and article collections that might be of general interest.
</p>
<a name="Tools_that_are_listed_as_relevant_to_SPARQL" id="Tools_that_are_listed_as_relevant_to_SPARQL"></a><h1> <span class="mw-headline"> Tools that are listed as relevant to SPARQL </span></h1>
<p>(Note that you can browse tools per <a href="/2001/sw/wiki/Category:Tool" title="Category:Tool">tool categories</a> or <a href="/2001/sw/wiki/Category:Programming_Language" title="Category:Programming Language">programming languages</a>, too.)
</p>
<a name="Last_modified_and.2For_added" id="Last_modified_and.2For_added"></a><h2> <span class="mw-headline"> Last modified and/or added </span></h2>
<p>The description of the following tools have been added and/or modified most recently.
</p>
				<ul>
<li><a href="/2001/sw/wiki/SPARQL2XQuery" title="SPARQL2XQuery">The SPARQL2XQuery Framework</a> (last modified: 29 December 2011)</li>
<li><a href="/2001/sw/wiki/SPARQL-RW" title="SPARQL-RW">The SPARQL-RW Framework</a> (last modified: 29 December 2011)</li>
<li><a href="/2001/sw/wiki/SMAD" title="SMAD">SMAD: Semantic Mobile Application Development</a> (last modified: 10 November 2011)</li>
<li><a href="/2001/sw/wiki/RDFaDev" title="RDFaDev">RDFa Developer</a> (last modified: 10 November 2011)</li>
<li><a href="/2001/sw/wiki/STW_Web_Services" title="STW Web Services">STW Web Services</a> (last modified: 10 November 2011)</li>
				</ul>
<p><br />
</p>
<a name="All_relevant_tools" id="All_relevant_tools"></a><h2> <span class="mw-headline"> All relevant tools </span></h2>
<p>This is a list of all tools listed on this wiki, and that are marked as relevant to SPARQL. 
</p>
				<ul>
<li><a href="/2001/sw/wiki/4store" title="4store">4store</a>  (triple store). 
</li>
<li><a href="/2001/sw/wiki/ARC" title="ARC">ARC RDF Store</a>  (triple store). Directly usable from PHP
</li>
<li><a href="/2001/sw/wiki/AllegroGraph" title="AllegroGraph">AllegroGraph RDF Store</a>  (triple store, programming environment, reasoner, development environment, rdfs reasoner). Directly usable from Java, LISP, Python, Prolog, C, Ruby, Perl
</li>
<li><a href="/2001/sw/wiki/Anzo" title="Anzo">Anzo Suite</a>  (development environment, programming environment, visualizer, converter). Directly usable from Javascript, Java, .Net
</li>
<li><a href="/2001/sw/wiki/Asio" title="Asio">Asio</a>  (development environment, rdf generator). 
</li>
<li><a href="/2001/sw/wiki/Bigdata" title="Bigdata">Bigdata®</a>  (triple store, reasoner, rdfs reasoner, owl reasoner). 
</li>
<li><a href="/2001/sw/wiki/ClioPatria" title="ClioPatria">ClioPatria</a>  (triple store, programming environment, reasoner, rule reasoner). Directly usable from Prolog, C
</li>
<li><a href="/2001/sw/wiki/Corese" title="Corese">Conceptual Resource Search Engine (Corese)</a>  (programming environment, reasoner, rule reasoner, rdfs reasoner). Directly usable from Java
</li>
<li><a href="/2001/sw/wiki/CubicWeb" title="CubicWeb">CubicWeb</a>  (programming environment). Directly usable from Python
</li>
<li><a href="/2001/sw/wiki/Cuebee" title="Cuebee">Cuebee: Knowledge Driven Query Formulation</a>  (visualizer, special browser). Directly usable from Javascript
</li>
<li><a href="/2001/sw/wiki/CWM" title="CWM">Closed World Machine (CWM)</a>  (programming environment, rule reasoner, owl reasoner, command line tool). Directly usable from Python
</li>
<li><a href="/2001/sw/wiki/Cypher" title="Cypher">Cypher</a>  (rdf generator, tagging). 
</li>
<li><a href="/2001/sw/wiki/D2rq" title="D2rq">D2RQ</a>  (triple store, programming environment). Directly usable from Java
</li>
<li><a href="/2001/sw/wiki/DBpedia_Spotlight" title="DBpedia Spotlight">DBpedia Spotlight</a>  (rdf generator, tagging). Directly usable from Java, Scala, Javascript
</li>
<li><a href="/2001/sw/wiki/DartGrid" title="DartGrid">DartGrid</a>  (programming environment). Directly usable from Java
</li>
<li><a href="/2001/sw/wiki/Djubby" title="Djubby">djubby</a>  (triple store, development environment). Directly usable from Python
</li>
<li><a href="/2001/sw/wiki/DotNetRDF" title="DotNetRDF">dotNetRDF</a>  (api, programming environment). Directly usable from .Net, C-sharp
</li>
<li><a href="/2001/sw/wiki/Dydra" title="Dydra">Dydra</a>  (sparql endpoint, triple store). Directly usable from Ruby
</li>
<li><a href="/2001/sw/wiki/ERDF" title="ERDF">eRDF</a>  (sparql endpoint, command line tool, development environment). 
</li>
<li><a href="/2001/sw/wiki/GR2RSS" title="GR2RSS">GR2RSS</a>  (converter, sparql endpoint). 
</li>
<li><a href="/2001/sw/wiki/GR4PHP" title="GR4PHP">GR4PHP</a>  (api, sparql endpoint, programming environment). Directly usable from PHP
</li>
<li><a href="/2001/sw/wiki/GeoSPARQL" title="GeoSPARQL">GeoSPARQL</a>  (programming environment). Directly usable from Java
</li>
<li><a href="/2001/sw/wiki/GoodRelations_Validator" title="GoodRelations Validator">GoodRelations Validator</a>  (validator). 
</li>
<li><a href="/2001/sw/wiki/Hercules" title="Hercules">Hercules</a>  (programming environment). Directly usable from Javascript
</li>
<li><a href="/2001/sw/wiki/IndexingSail" title="IndexingSail">IndexingSail: GeoSparql for Sesame Triplestores</a>  (triple store, development environment). Directly usable from Java
</li>
				<li><a href="/2001/sw/wiki/Special:Ask/-5B-5BCategory:Tool-5D-5D-20-5B-5BSW-20Technology::SPARQL-5D-5D/-3FTool-20Name%3D/-3FCategory%3D/-3FProgramming-20language%3D/format%3Dul/template%3DToolDisplayLinkWithNameWithcategoryAndLanguage/link%3Dnone/columns%3D1" title="Special:Ask/-5B-5BCategory:Tool-5D-5D-20-5B-5BSW-20Technology::SPARQL-5D-5D/-3FTool-20Name=/-3FCategory=/-3FProgramming-20language=/format=ul/template=ToolDisplayLinkWithNameWithcategoryAndLanguage/link=none/columns=1"> … further results</a></li>
				</ul>

<!-- 
NewPP limit report
Preprocessor node count: 769/1000000
Post-expand include size: 14084/2097152 bytes
Template argument size: 3101/2097152 bytes
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key wikidb-sw_:pcache:idhash:73-0!1!0!!en!2!edit=0 and timestamp 20120116151622 -->
<div id='RDFa' about='http://www.w3.org/2001/sw/wiki/SPARQL' xmlns:wiki_1='http://www.w3.org/2001/sw/wiki/index.php/'xmlns:wiki_1_property='http://www.w3.org/2001/sw/wiki/index.php/Property:'xmlns:wiki_1_category='http://www.w3.org/2001/sw/wiki/index.php/Category:'>
</div><div style='display:none' ></div><div class="printfooter">
Retrieved from "<a href="http://www.w3.org/2001/sw/wiki/SPARQL">http://www.w3.org/2001/sw/wiki/SPARQL</a>"</div>
			<div id='catlinks' class='catlinks'><div id="mw-normal-catlinks"><a href="/2001/sw/wiki/Special:Categories" title="Special:Categories">Categories</a>:&#32;<span dir='ltr'><a href="/2001/sw/wiki/Category:Work" title="Category:Work">Work</a></span> | <span dir='ltr'><a href="/2001/sw/wiki/Category:Recommendation" title="Category:Recommendation">Recommendation</a></span></div></div>			<!-- end content -->
						<div class="visualClear"></div>
		</div>
	</div>
		</div>
		<div id="column-one">
	<div id="p-cactions" class="portlet">
		<h5>Views</h5>
		<div class="pBody">
			<ul>
	
				 <li id="ca-nstab-main" class="selected"><a href="/2001/sw/wiki/SPARQL" title="View the content page [c]" accesskey="c">Page</a></li>
				 <li id="ca-talk" class="new"><a href="/2001/sw/wiki/index.php?title=Talk:SPARQL&amp;action=edit&amp;redlink=1" title="Discussion about the content page [t]" accesskey="t">Discussion</a></li>
				 <li id="ca-viewsource"><a href="/2001/sw/wiki/index.php?title=SPARQL&amp;action=edit" title="This page is protected.&#10;You can view its source [e]" accesskey="e">View source</a></li>
				 <li id="ca-history"><a href="/2001/sw/wiki/index.php?title=SPARQL&amp;action=history" title="Past revisions of this page [h]" accesskey="h">History</a></li>			</ul>
		</div>
	</div>
	<div class="portlet" id="p-personal">
		<h5>Personal tools</h5>
		<div class="pBody">
			<ul>
				<li id="pt-login"><a href="/2001/sw/wiki/index.php?title=Special:UserLogin&amp;returnto=SPARQL" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o">Log in</a></li>
			</ul>
		</div>
	</div>
	<div class="portlet" id="p-logo">
		<a style="background-image: url(/Icons/SW/sw-vert-w3c.png);" href="/2001/sw/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"></a>
	</div>
	<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
	<div class='generated-sidebar portlet' id='p-Navigation'>
		<h5>Navigation</h5>
		<div class='pBody'>
			<ul>
				<li id="n-mainpage"><a href="/2001/sw/wiki/Main_Page" title="Visit the main page">Main Page</a></li>
				<li id="n-recentchanges"><a href="/2001/sw/wiki/Special:RecentChanges" title="The list of recent changes in the wiki [r]" accesskey="r">Recent changes</a></li>
				<li id="n-Tools"><a href="/2001/sw/wiki/Tools">Tools</a></li>
				<li id="n-Books"><a href="/2001/sw/wiki/Books">Books</a></li>
				<li id="n-Validators"><a href="/2001/sw/wiki/SWValidators">Validators</a></li>
			</ul>
		</div>
	</div>
	<div class='generated-sidebar portlet' id='p-Other_W3C_resources'>
		<h5>Other W3C resources</h5>
		<div class='pBody'>
			<ul>
				<li id="n-Activity-news"><a href="http://www.w3.org/2001/sw/anews/">Activity news</a></li>
				<li id="n-Publications"><a href="http://www.w3.org/2001/sw/Specs.html">Publications</a></li>
				<li id="n-Logos.2C-buttons"><a href="http://www.w3.org/2007/10/sw-logos.html">Logos, buttons</a></li>
				<li id="n-Activity-home-page"><a href="http://www.w3.org/2001/sw/">Activity home page</a></li>
			</ul>
		</div>
	</div>
	<div class='generated-sidebar portlet' id='p-W3C_RSS_feeds'>
		<h5>W3C RSS feeds</h5>
		<div class='pBody'>
			<ul>
				<li id="n-Activity-newsfeed"><a href="http://www.w3.org/blog/SW?tempskin=_rdf">Activity newsfeed</a></li>
				<li id="n-W3C-blogs"><a href="http://www.ivan-herman.net/cgi-bin/toRss1.py?uri=http://www.w3.org/QA/atom.xml&amp;categories=[Semantic+Web]&amp;title=W3C+QA+Blog,+Semantic+Web&amp;link=http://www.w3.org/QA/atom.xml">W3C blogs</a></li>
				<li id="n-Use-cases.2C-case-studies"><a href="http://www.w3.org/2001/sw/sweo/public/UseCases/Overview.rdf">Use cases, case studies</a></li>
			</ul>
		</div>
	</div>
	<div class='generated-sidebar portlet' id='p-Account_request'>
		<h5>Account request</h5>
		<div class='pBody'>
			<ul>
				<li id="n-W3C-Member"><a href="http://www.w3.org/Help/Account/Request/Member">W3C Member</a></li>
				<li id="n-Public"><a href="http://www.w3.org/Help/Account/Request/Public">Public</a></li>
			</ul>
		</div>
	</div>
	<div id="p-search" class="portlet">
		<h5><label for="searchInput">Search</label></h5>
		<div id="searchBody" class="pBody">
			<form action="/2001/sw/wiki/index.php" id="searchform"><div>
				<input type='hidden' name="title" value="Special:Search"/>
				<input id="searchInput" name="search" type="text" title="Search Semantic Web Standards [f]" accesskey="f" value="" />
				<input type='submit' name="go" class="searchButton" id="searchGoButton"	value="Go" title="Go to a page with this exact name if exists" />&nbsp;
				<input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="Search" title="Search the pages for this text" />
			</div></form>
		</div>
	</div>
	<div class="portlet" id="p-tb">
		<h5>Toolbox</h5>
		<div class="pBody">
			<ul>
				<li id="t-whatlinkshere"><a href="/2001/sw/wiki/Special:WhatLinksHere/SPARQL" title="List of all wiki pages that link here [j]" accesskey="j">What links here</a></li>
				<li id="t-recentchangeslinked"><a href="/2001/sw/wiki/Special:RecentChangesLinked/SPARQL" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li>
<li id="t-specialpages"><a href="/2001/sw/wiki/Special:SpecialPages" title="List of all special pages [q]" accesskey="q">Special pages</a></li>
				<li id="t-print"><a href="/2001/sw/wiki/index.php?title=SPARQL&amp;printable=yes" rel="alternate" title="Printable version of this page [p]" accesskey="p">Printable version</a></li>				<li id="t-permalink"><a href="/2001/sw/wiki/index.php?title=SPARQL&amp;oldid=1374" title="Permanent link to this revision of the page">Permanent link</a></li><li id="t-smwbrowselink"><a href="/2001/sw/wiki/Special:Browse/SPARQL" title="Special:Browse/SPARQL">Browse properties</a></li>			</ul>
		</div>
	</div>
		</div><!-- end of the left (by default at least) column -->
			<div class="visualClear"></div>
			<div id="footer">
				<div id="f-poweredbyico"><a href="http://www.mediawiki.org/"><img src="/2001/sw/wiki/skins/common/images/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" /></a></div>
			<ul id="f-list">
					<li id="lastmod"> This page was last modified on 6 January 2010, at 16:43.</li>
					<li id="viewcount">This page has been accessed 68,043 times.</li>
					<li id="privacy"><a href="/2001/sw/wiki/Semantic_Web_Standards:Privacy_policy" title="Semantic Web Standards:Privacy policy">Privacy policy</a></li>
					<li id="about"><a href="/2001/sw/wiki/Semantic_Web_Standards:About" title="Semantic Web Standards:About">About Semantic Web Standards</a></li>
					<li id="disclaimer"><a href="/2001/sw/wiki/Semantic_Web_Standards:General_disclaimer" title="Semantic Web Standards:General disclaimer">Disclaimers</a></li>
			</ul>
		</div>
</div>

		<script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script>
<!-- Served in 0.247 secs. --></body></html>