Named graph#Named graphs and quads

{{Short description|Extension of the RDF data model}}

{{Infobox technology standard

| title = Named Graph

| status = Published

| year_started = {{Start date and age|2005}}

| editors = Jeremy J. Carroll

| base_standards = URI and RDF

| related_standards = TriX, TriG, N-Quads

| domain = Semantic Web

| abbreviation =

| website =

}}

File:Named-graphs-1.jpg

Named graphs are a key concept of Semantic Web architecture in which a set of Resource Description Framework statements (a graph) are identified using a URI,strictly speaking a URIRef allowing descriptions to be made of that set of statements such as context, provenance information or other such metadata.

Named graphs are a simple extension of the RDF data modelhttp://www.w3.org/TR/PR-rdf-syntax/ "Resource Description Framework (RDF) Model and Syntax Specification" through which graphs can be created but the model lacks an effective means of distinguishing between them once published on the Web at large.

Named graphs and HTTP

One conceptualization of the Web is as a graph of document nodes identified with URIs and connected by hyperlink arcs which are expressed within the HTML documents. By doing an HTTP GET on a URI (usually via a Web browser), a somehow-related document may be retrieved. This "follow your nose" approach also applies to RDF documents on the Web in the form of Linked Data, where typically an RDF syntax is used to express data as a series of statements, and URIs within the RDF point to other resources. This Web of data has been described by Tim Berners-Lee as the "Giant Global Graph".[http://dig.csail.mit.edu/breadcrumbs/node/215 Giant Global Graph] {{webarchive|url=https://web.archive.org/web/20160713021037/http://dig.csail.mit.edu/breadcrumbs/node/215 |date=2016-07-13 }}

File:Named-graphs-2.jpg

Named graphs are a formalization of the intuitive idea that the contents of an RDF document (a graph) on the Web can be considered to be named by the URI of the document. This considerably simplifies techniques for managing chains of provenance for pieces of data and enabling fine-grained access control to the source data. Additionally, trust can be managed through the publisher applying a digital signature to the data in the named graph. (Support for these facilities was originally intended to come from RDF reification, however, that approach proved problematic.[http://www.w3.org/DesignIssues/Reify.html Reification of RDF and N3])

Named graphs and RDF stores

While named graphs may appear on the Web as simple linked documents (i.e. Linked Data), they are also very useful for managing sets of RDF data within an RDF store. In particular, the scope of a SPARQL query may be limited to a specific set of named graphs.

= Example =

Assume the following (Turtle) RDF document has been placed in a SPARQL-capable store with the name {{mono|http://example.org/joe}}.

@prefix foaf: .

a foaf:Person .

foaf:homepage .

foaf:mbox .

foaf:name "Joe Lambda" .

This data has been written in a more verbose form than necessary to show the triple structures

The homepage of the person with the email address {{mono|mailto:joe@example.org}} can be obtained using the SPARQL query:

PREFIX foaf:

SELECT ?homepage

FROM NAMED

WHERE {

GRAPH ?g {

?person foaf:homepage ?homepage .

?person foaf:mbox .

}

}

The FROM NAMED here identifies the target graph for the query.

= Named graphs and quads =

Prior to the publication of the papers describing named graphs, there was considerable discussion about fulfilling their role within a store by using an arity greater than that of RDF triple statements: where triples have the form subject predicate object, quads would have a form along the lines of subject predicate object context. Named graphs can be represented this way, as subject predicate object graphname, with the advantage that the graphname part will be a URI, giving the quad Web-global scope compared to arbitrary local statement names. This way of representing quads resp.{{huh?|date=February 2023|reason= Expand the abbreviation so that it is unambiguous }} quad-statements was incorporated in the specification of N-Quads.{{Cite web|url=https://www.w3.org/TR/n-quads/|title=RDF 1.1 N-Quads}}

Formal definition

A paper from the WWW 2005 conference by Carroll et al. includes a formal definition of named graphs.{{Cite journal|url=https://www.sciencedirect.com/science/article/abs/pii/S1570826805000235|doi = 10.1016/j.websem.2005.09.001|title = Named graphs|year = 2005|last1 = Carroll|first1 = Jeremy J.|last2 = Bizer|first2 = Christian|last3 = Hayes|first3 = Pat|last4 = Stickler|first4 = Patrick|journal = Journal of Web Semantics|volume = 3|issue = 4|pages = 247–267|url-access = subscription}}

Specifications

{{Update|section|date=May 2023|reason=Certainly TriG has been a W3C recommendation since 2014; there are probably other pertinent specifications as well}}

There is currently no specification for named graphs in themselves beyond that described in Carroll et al. (2005) and Carroll and Stickler (2004)[http://www.hpl.hp.com/techreports/2004/HPL-2004-56.pdf TriX : RDF Triples in XML] (which includes syntaxes for representing named graphs), but they do form part of the SPARQL Protocol and RDF Query Language specification.

Proposed specifications

See also

  • {{cite web |url=http://www.jenitennison.com/blog/node/159 |title=What Do URIs Mean Anyway? |author=Jeni Tennison |date=2011-07-05 |work=Jeni's Musings |publisher=Jeni Tennison |access-date=6 July 2011}}

References

{{DEFAULTSORT:Named Graph}}

Category:Semantic Web

Category:Graphs