Array ( [0] => {{Short description|RDF query language}} [1] => {{Use dmy dates|date=November 2020}} [2] => {{More citations needed|date=March 2013}} [3] => [4] => {{Infobox programming language [5] => | name = SPARQL [6] => | logo = [7] => | logo caption = [8] => | paradigm = [[Query language]] [9] => | year = {{Start date and age|2008}} [10] => | designer = [11] => | developer = [[W3C]] [12] => | latest_release_version = 1.1 [13] => | latest_release_date = {{Start date and age|df=yes|2013|03|21}} [14] => | typing = [15] => | implementations = [[Jena (framework)|Jena]],{{cite book [16] => | last1 = Hebeler [17] => | first1 = John [18] => | last2 = Fisher [19] => | first2 = Matthew [20] => | last3 = Blace [21] => | first3 = Ryan [22] => | last4 = Perez-Lopez [23] => | first4 = Andrew [24] => | title = Semantic Web Programming [25] => | location = Indianapolis, Indiana [26] => | publisher = [[John Wiley & Sons]] [27] => | page = [https://archive.org/details/isbn_9780470418017/page/406 406] [28] => | year = 2009 [29] => | isbn = 978-0-470-41801-7 [30] => | url-access = registration [31] => | url = https://archive.org/details/isbn_9780470418017/page/406 [32] => }} [[Virtuoso Universal Server|OpenLink Virtuoso]] [33] => | dialects = [34] => | website = {{url|http://www.w3.org/TR/sparql11-query/}} [35] => }} [36] => [37] => '''SPARQL''' (pronounced "[[:wikt:sparkle|sparkle]]", a [[recursive acronym]]{{cite web [38] => |title = What does SPARQL stand for? [39] => |first = Dave |last = Beckett [40] => |date= 2011-10-06 [41] => |website=semantic-web@w3.org [42] => |url = http://lists.w3.org/Archives/Public/semantic-web/2011Oct/0041.html [43] => }} for '''SPARQL Protocol and RDF Query Language''') is an [[RDF query language]]—that is, a [[Semantic Query|semantic]] [[query language]] for [[database]]s—able to retrieve and manipulate data stored in [[Resource Description Framework|Resource Description Framework (RDF)]] format.{{Cite web |url=http://www.eweek.com/development/sparql-will-make-the-web-shine |title=SPARQL Will Make the Web Shine |last=Jim Rapoza |date=2 May 2006 |website=[[eWeek]] |access-date=2007-01-17}}{{Cite book |last1=Segaran |first1=Toby |title=Programming the Semantic Web |last2=Evans |first2=Colin |last3=Taylor |first3=Jamie |publisher=O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472 |year=2009 |isbn=978-0-596-15381-6 |page=84}} It was made a standard by the ''RDF Data Access Working Group'' (DAWG) of the [[World Wide Web Consortium]], and is recognized as one of the key technologies of the [[semantic web]]. On 15 January 2008, SPARQL 1.0 was acknowledged by [[W3C]] as an official recommendation,{{Cite web |url=http://www.w3.org/blog/SW/2008/01/15/sparql_is_a_recommendation |title=W3C Semantic Web Activity News – SPARQL is a Recommendation |date=2008-01-15 |publisher=W3.org |access-date=2009-10-01 |archive-date=20 January 2008 |archive-url=https://web.archive.org/web/20080120113448/http://www.w3.org/blog/SW/2008/01/15/sparql_is_a_recommendation |url-status=dead }}{{cite web|url=http://www.dblab.ntua.gr/~bikakis/XMLSemanticWebW3CTimeline.pdf |title=XML and Semantic Web W3C Standards Timeline [44] => |date=2012-02-04|access-date=2013-11-27}} and SPARQL 1.1 in March, 2013.{{Cite web |url=http://www.w3.org/blog/SW/2013/03/21/eleven-sparql-1-1-specifications-are-w3c-recommendations/ |title=Eleven SPARQL 1.1 Specifications are W3C Recommendations |date=2013-03-21 |publisher=w3.org |access-date=2013-04-25}} [45] => [46] => SPARQL allows for a query to consist of [[triplestore|triple patterns]], [[logical conjunction|conjunctions]], [[logical disjunction|disjunctions]], and optional [[software design pattern|pattern]]s.{{Cite web |url=http://www.xml.org/xml/news/archives/archive.10062006.shtml#5 |title=XML and Web Services in the News |date=6 October 2006 |website=xml.org |access-date=2007-01-17}} [47] => [48] => Implementations for multiple [[programming language]]s exist.{{Cite web |url=http://esw.w3.org/topic/SparqlImplementations |title=SparqlImplementations – ESW Wiki |publisher=Esw.w3.org |access-date=2009-10-01}} There exist tools that allow one to connect and semi-automatically construct a SPARQL query for a SPARQL endpoint, for example ViziQuer.{{Cite web |url=http://viziquer.lumii.lv/ |title=ViziQuer a tool to construct SPARQL queries automatically |publisher=lumii.lv |access-date=2011-02-25}} [49] => In addition, tools exist to translate SPARQL queries to other query languages, for example to [[SQL]]{{Cite web |url=http://www4.wiwiss.fu-berlin.de/bizer/d2r-server/ |title=D2R Server |access-date=2012-02-04}} and to [[XQuery]].{{Cite web |url=http://www.dblab.ntua.gr/~bikakis/SPARQL2XQuery.html |title=SPARQL2XQuery Framework |access-date=2012-02-04}} [50] => [51] => ==Advantages== [52] => [53] => SPARQL allows users to write queries against what can loosely be called "key-value" data or, more specifically, data that follow the [[Resource Description Framework|RDF]] specification of the [[World Wide Web Consortium|W3C]]. Thus, the entire database is a set of "subject-predicate-object" triples. This is analogous to some [[NoSQL]] databases' usage of the term "document-key-value", such as [[Mongodb|MongoDB]]. [54] => [55] => In [[SQL]] [[relational database]] terms, [[Resource Description Framework|RDF]] data can also be considered a table with three columns – the subject column, the predicate column, and the object column. The subject in RDF is analogous to an entity in a [[SQL|SQL database]], where the data elements (or fields) for a given [[business object]] are placed in multiple columns, sometimes spread across more than one table, and identified by a [[unique key]]. In RDF, those fields are instead represented as separate predicate/object rows sharing the same subject, often the same unique key, with the predicate being analogous to the column name and the object the actual data. Unlike relational databases, the object column is heterogeneous: the per-cell data type is usually implied (or specified in the [[Ontology (information science)|ontology]]) by the [[SQL#Language elements|predicate]] value. Also unlike SQL, RDF can have multiple entries per predicate; for instance, one could have multiple "child" entries for a single "person", and can return collections of such objects, like "children". [56] => [57] => Thus, SPARQL provides a full set of analytic query operations such as JOIN, SORT, AGGREGATE for data whose [[Database schema|schema]] is intrinsically part of the data rather than requiring a separate schema definition. However, schema information (the ontology) is often provided externally, to allow joining of different [[Data set|datasets]] unambiguously. In addition, SPARQL provides specific [[graph (data structure)|graph]] traversal syntax for data that can be thought of as a graph. [58] => [59] => The example below demonstrates a simple query that leverages the [[Ontology (information science)|ontology]] definition [[FOAF (ontology)|foaf]] ("friend of a friend"). [60] => [61] => Specifically, the following query returns names and emails of every person in the [[Data set|dataset]]: [62] => [63] => PREFIX foaf: [64] => SELECT ?name [65] => ?email [66] => WHERE [67] => { [68] => ?person a foaf:Person . [69] => ?person foaf:name ?name . [70] => ?person foaf:mbox ?email . [71] => } [72] => [73] => [74] => This query joins together all of the triples with a matching subject, where the type predicate, "a", is a person (foaf:Person), and the person has one or more names (foaf:name) and mailboxes (foaf:mbox). [75] => [76] => For the sake of readability, the author of this query chose to reference the subject using the variable name "?person". Since the first element of the triple is always the subject, the author could have just as easily used any variable name, such as "?subj" or "?x". Whatever name is chosen, it must be the same on each line of the query to signify that the query engine is to join triples with the same subject. [77] => [78] => The result of the join is a set of rows – ?person, ?name, ?email. This query returns the ?name and ?email because ?person is often a complex URI rather than a human-friendly string. Note that any ?person may have multiple mailboxes, so in the returned set, a ?name row may appear multiple times, once for each mailbox. [79] => [80] => This query can be distributed to multiple SPARQL endpoints (services that accept SPARQL queries and return results), computed, and results gathered, a procedure known as [[federated search|federated query]]. [81] => [82] => Whether in a federated manner or locally, additional triple definitions in the query could allow joins to different subject types, such as automobiles, to allow simple queries, for example, to return a list of names and emails for people who drive automobiles with a high fuel efficiency. [83] => [84] => ==Query forms== [85] => [86] => In the case of queries that read data from the database, the SPARQL language specifies four different query variations for different purposes. [87] => ;SELECT query: Used to extract raw values from a SPARQL endpoint, the results are returned in a table format. [88] => ;CONSTRUCT query: Used to extract information from the SPARQL endpoint and transform the results into valid RDF. [89] => ;ASK query: Used to provide a simple True/False result for a query on a SPARQL endpoint. [90] => ;DESCRIBE query: Used to extract an RDF graph from the SPARQL endpoint, the content of which is left to the endpoint to decide, based on what the maintainer deems as useful information. [91] => Each of these query forms takes a WHERE block to restrict the query, although, in the case of the DESCRIBE query, the WHERE is optional. [92] => [93] => SPARQL 1.1 specifies a language for updating the database with several new query forms.{{Cite book|last=Yu|first=Liyang|title=A Developer's Guide to the Semantic Web|publisher=Springer|year=2014|isbn=9783662437964|location=|pages=308}} [94] => [95] => ==Example== [96] => [97] => Another SPARQL query example that models the question "What are all the country capitals in Africa?": [98] => [99] => PREFIX ex: [100] => SELECT ?capital [101] => ?country [102] => WHERE [103] => { [104] => ?x ex:cityname ?capital ; [105] => ex:isCapitalOf ?y . [106] => ?y ex:countryname ?country ; [107] => ex:isInContinent ex:Africa . [108] => } [109] => [110] => [111] => Variables are indicated by a ? or $ prefix. Bindings for ?capital and the ?country will be returned. When a triple ends with a semicolon, the subject from this triple will implicitly complete the following pair to an entire triple. So for example ex:isCapitalOf ?y is short for ?x ex:isCapitalOf ?y. [112] => [113] => The SPARQL query processor will search for sets of triples that match these four triple patterns, binding the variables in the query to the corresponding parts of each triple. Important to note here is the "property orientation" (class matches can be conducted solely through class-attributes or properties – see [[Duck typing]]). [114] => [115] => To make queries concise, SPARQL allows the definition of prefixes and base [[URI]]s in a fashion similar to [[Turtle (syntax)|Turtle]]. In this query, the prefix "ex" stands for “http://example.com/exampleOntology#”. [116] => [117] => ==Extensions== [118] => [119] => [[GeoSPARQL]] defines filter functions for [[geographic information system]] (GIS) queries using well-understood OGC standards ([[Geography Markup Language|GML]], [[well-known text|WKT]], etc.). [120] => [121] => [[SPARUL]] is another extension to SPARQL. It enables the RDF store to be updated with this declarative query language, by adding INSERT and DELETE methods. [122] => [123] => [[XSPARQL]] is an integrated query language combining [[XQuery]] with SPARQL to query both XML and RDF data sources at once.{{Cite web |url=https://www.w3.org/blog/2009/06/xsparql_published_as_a_w3c_submission/ |title=XSPARQL published as a W3C Submission |date=2009-06-23 |publisher=W3.org |access-date=2022-05-22}} [124] => [125] => ==Implementations== [126] => {{Main|List of SPARQL implementations}} [127] => [128] => Open source, reference SPARQL implementations [129] => [130] => * [[RDF4J]], formerly Sesame from [[Eclipse Foundation]] [131] => * [[Jena (framework)]] from [[Apache Software Foundation]] [132] => * [[Virtuoso Universal Server|OpenLink Virtuoso]] [133] => [134] => See [[List of SPARQL implementations]] for more comprehensive coverage, including [[triplestore]], [[API]]s, and other storages that have implemented the SPARQL standard. [135] => [136] => ==See also== [137] => * [[Semantic Integration]] [138] => * [[SPARQL Query Results XML Format]] [139] => * [[SPARQL Syntax Expressions]] [140] => * [[Wikidata]] [141] => [142] => ==References== [143] => {{Reflist}} [144] => [145] => ==External links== [146] => {{Commons category}} [147] => * [https://www.w3.org/blog/data/ W3C Data Activity Blog] [148] => * [https://www.w3.org/2009/sparql/wiki/Main_Page W3C SPARQL 1.1 Working Group - closed - mailing lists and archives], was RDF Data Access Working Group [149] => * [http://www.w3.org/TR/sparql11-overview/ SPARQL 1.1 Recommendation] [150] => * [http://www.w3.org/TR/rdf-sparql-query/ SPARQL 1.0 Query language] (legacy) [151] => * [http://www.w3.org/TR/rdf-sparql-protocol/ SPARQL 1.0 Protocol] (legacy) [152] => * [http://www.w3.org/TR/2008/REC-rdf-sparql-XMLres-20080115/ SPARQL 1.0 Query XML Results Format] (legacy) [153] => * [http://www.dblab.ntua.gr/~bikakis/SPARQL2XQuery.html SPARQL2XQuery] Mappings between OWL-RDF/S & XML Schemas, and XML Schema to OWL Transformation. [154] => * [http://jena.sourceforge.net/ARQ/algebra.html SPARQL Syntax Expressions in the ARQ query engine] [155] => * [http://blog.dydra.com/2011/09/08/dawg-tests SPARQL Syntax Expressions translations of the DAWG test suite] {{Webarchive|url=https://web.archive.org/web/20150607214010/http://blog.dydra.com/2011/09/08/dawg-tests |date=7 June 2015 }} [156] => * [https://query.wikidata.org Wikidata] [157] => * [https://wdqs-tutorial.toolforge.org/ Wikidata Query Service Tutorial] [158] => * [http://dbpedia.org/sparql/ DBpedia] [159] => [160] => {{-}} [161] => {{Semantic Web}} [162] => {{Query languages}} [163] => [164] => {{Authority control}} [165] => [166] => {{DEFAULTSORT:Sparql}} [167] => [[Category:SPARQL| ]] [168] => [[Category:Data modeling languages]] [169] => [[Category:Declarative programming languages]] [170] => [[Category:Query languages]] [171] => [[Category:RDF data access]] [172] => [[Category:Resource Description Framework]] [173] => [[Category:Web services]] [174] => [[Category:World Wide Web Consortium standards]] [175] => [[Category:Programming languages created in 2008]] [] => )
good wiki

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 Framework (RDF) format. It was made a standard by the RDF Data Access Working Group (DAWG) of the World Wide Web Consortium, and is recognized as one of the key technologies of the semantic web.

More about us

About

Expert Team

Vivamus eget neque lacus. Pellentesque egauris ex.

Award winning agency

Lorem ipsum, dolor sit amet consectetur elitorceat .

10 Year Exp.

Pellen tesque eget, mauris lorem iupsum neque lacus.