Named graph

Last updated
Named Graph
StatusPublished
Year started2005;18 years ago (2005)
EditorsJeremy J. Carroll
Base standards URI and RDF
Related standards TriX, TriG, N-Quads
Domain Semantic Web
A named graph Named-graphs-1.jpg
A named graph

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, [1] allowing descriptions to be made of that set of statements such as context, provenance information or other such metadata.

Contents

Named graphs are a simple extension of the RDF data model [2] 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". [3]

Describing a named graph Named-graphs-2.jpg
Describing a named graph

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. [4] )

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 http://example.org/joe.

@prefixfoaf:<http://xmlns.com/foaf/0.1/>.<http://example.org/joe#me>afoaf:Person.<http://example.org/joe#me>foaf:homepage<http://example.org/joe/index.html>.<http://example.org/joe#me>foaf:mbox<mailto:joe@example.org>.<http://example.org/joe#me>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 mailto:joe@example.org can be obtained using the SPARQL query:

PREFIXfoaf:<http://xmlns.com/foaf/0.1/>SELECT?homepageFROM NAMED<http://example.org/joe>WHERE{GRAPH?g{?personfoaf:homepage?homepage.?personfoaf:mbox<mailto:joe@example.org>.}}

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 above 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.[ clarification needed ] quad-statements was incorporated in the specification of N-Quads. [5]

Formal definition

A paper from the WWW 2005 conference by Carroll et al. includes a formal definition of named graphs. [6]

Specifications

There is currently no specification for named graphs in themselves beyond that described in Carroll et al. (2005) [6] and Carroll and Stickler (2004) [7] (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

Related Research Articles

The Semantic Web, sometimes known as Web 3.0, is an extension of the World Wide Web through standards set by the World Wide Web Consortium (W3C). The goal of the Semantic Web is to make Internet data machine-readable.

The Resource Description Framework (RDF) is a World Wide Web Consortium (W3C) standard originally designed as a data model for metadata. It has come to be used as a general method for description and exchange of graph data. RDF provides a variety of syntax notations and data serialization formats, with Turtle currently being the most widely used notation.

RDF Schema (Resource Description Framework Schema, variously abbreviated as RDFS, RDF(S), RDF-S, or RDF/S) is a set of classes with certain properties using the RDF extensible knowledge representation data model, providing basic elements for the description of ontologies. It uses various forms of RDF vocabularies, intended to structure RDF resources. RDF and RDFS can be saved in a triplestore, then one can extract some knowledge from them using a query language, like SPARQL.

SPARQL 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. On 15 January 2008, SPARQL 1.0 was acknowledged by W3C as an official recommendation, and SPARQL 1.1 in March, 2013.

<span class="mw-page-title-main">FOAF</span> Semantic Web ontology to describe relations between people

FOAF is a machine-readable ontology describing persons, their activities and their relations to other people and objects. Anyone can use FOAF to describe themselves. FOAF allows groups of people to describe social networks without the need for a centralised database.

A web resource is any identifiable resource present on or connected to the World Wide Web. Resources are identified using Uniform Resource Identifiers (URI). In the Semantic Web, web resources and their semantic properties are described using the Resource Description Framework (RDF).

RDFa or Resource Description Framework in Attributes is a W3C Recommendation that adds a set of attribute-level extensions to HTML, XHTML and various XML-based document types for embedding rich metadata within Web documents. The Resource Description Framework (RDF) data-model mapping enables its use for embedding RDF subject-predicate-object expressions within XHTML documents. It also enables the extraction of RDF model triples by compliant user agents.

<span class="mw-page-title-main">RDFLib</span> Python library to serialize, parse and process RDF data

RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information. This library contains parsers/serializers for almost all of the known RDF serializations, such as RDF/XML, Turtle, N-Triples, & JSON-LD, many of which are now supported in their updated form. The library also contains both in-memory and persistent Graph back-ends for storing RDF information and numerous convenience functions for declaring graph namespaces, lodging SPARQL queries and so on. It is in continuous development with the most recent stable release, rdflib 6.1.1 having been released on 20 December 2021. It was originally created by Daniel Krech with the first release in November, 2002.

In computing, Terse RDF Triple Language (Turtle) is a syntax and file format for expressing data in the Resource Description Framework (RDF) data model. Turtle syntax is similar to that of SPARQL, an RDF query language. It is a common data format for storing RDF data, along with N-Triples, JSON-LD and RDF/XML.

An RDF query language is a computer language, specifically a query language for databases, able to retrieve and manipulate data stored in Resource Description Framework (RDF) format.

<span class="mw-page-title-main">Blank node</span>

In RDF, a blank node is a node in an RDF graph representing a resource for which a URI or literal is not given. The resource represented by a blank node is also called an anonymous resource. According to the RDF standard a blank node can only be used as subject or object of an RDF triple.

The Rule Interchange Format (RIF) is a W3C Recommendation. RIF is part of the infrastructure for the semantic web, along with (principally) SPARQL, RDF and OWL. Although originally envisioned by many as a "rules layer" for the semantic web, in reality the design of RIF is based on the observation that there are many "rules languages" in existence, and what is needed is to exchange rules between them.

N-Triples is a format for storing and transmitting data. It is a line-based, plain text serialisation format for RDF graphs, and a subset of the Turtle format. N-Triples should not be confused with Notation3 which is a superset of Turtle. N-Triples was primarily developed by Dave Beckett at the University of Bristol and Art Barstow at the World Wide Web Consortium (W3C).

A triplestore or RDF store is a purpose-built database for the storage and retrieval of triples through semantic queries. A triple is a data entity composed of subject–predicate–object, like "Bob is 35" or "Bob knows Fred".

A graph database (GDB) is a database that uses graph structures for semantic queries with nodes, edges, and properties to represent and store data. A key concept of the system is the graph. The graph relates the data items in the store to a collection of nodes and edges, the edges representing the relationships between the nodes. The relationships allow data in the store to be linked together directly and, in many cases, retrieved with one operation. Graph databases hold the relationships between data as a priority. Querying relationships is fast because they are perpetually stored in the database. Relationships can be intuitively visualized using graph databases, making them useful for heavily inter-connected data.

TriG is a serialization format for RDF graphs. It is a plain text format for serializing named graphs and RDF Datasets which offers a compact and readable alternative to the XML-based TriX syntax.

XHTML+RDFa is an extended version of the XHTML markup language for supporting RDF through a collection of attributes and processing rules in the form of well-formed XML documents. XHTML+RDFa is one of the techniques used to develop Semantic Web content by embedding rich semantic markup. Version 1.1 of the language is a superset of XHTML 1.1, integrating the attributes according to RDFa Core 1.1. In other words, it is an RDFa support through XHTML Modularization.

JSON-LD is a method of encoding linked data using JSON. One goal for JSON-LD was to require as little effort as possible from developers to transform their existing JSON to JSON-LD. JSON-LD allows data to be serialized in a way that is similar to traditional JSON. It was initially developed by the JSON for Linking Data Community Group before being transferred to the RDF Working Group for review, improvement, and standardization, and is currently maintained by the JSON-LD Working Group. JSON-LD is a World Wide Web Consortium Recommendation.

A semantic triple, or RDF triple or simply triple, is the atomic data entity in the Resource Description Framework (RDF) data model. As its name indicates, a triple is a set of three entities that codifies a statement about semantic data in the form of subject–predicate–object expressions.

Shapes Constraint Language (SHACL) is a World Wide Web Consortium (W3C) standard language for describing Resource Description Framework (RDF) graphs. SHACL has been designed to enhance the semantic and technical interoperability layers of ontologies expressed as RDF graphs.

References

  1. strictly speaking a URIRef
  2. http://www.w3.org/TR/PR-rdf-syntax/ "Resource Description Framework (RDF) Model and Syntax Specification"
  3. Giant Global Graph Archived 2016-07-13 at the Wayback Machine
  4. Reification of RDF and N3
  5. "RDF 1.1 N-Quads".
  6. 1 2 Carroll, Jeremy J.; Bizer, Christian; Hayes, Pat; Stickler, Patrick (2005). "Named graphs". Journal of Web Semantics. 3 (4): 247–267. doi:10.1016/j.websem.2005.09.001.
  7. TriX : RDF Triples in XML