Relation between datasets and Named Graphs in the Triple Store

Named Graphs provide a mechanism to organise RDF triples into meaningful groups, since a Named Graph is a collection of RDF statements identified by a URI. Named Graphs are useful to organise the data in a Triple Store, and they also offer the possibility of recording the provenance of data in triples, since the URI of the named Graph can be the subject of more (metadata) triples.

Named Graphs at Open Data Euskadi

The Named Graph and metadata mechanism is used at Open Data Euskadi to add provenance information to the RDF datasets generated from Open Data Euskadi datasets. Those datasets already have DCAT metadata, so the DCAT is "recycled" to obtain the metadata of the datasets that are created by converting existing Open Data Euskadi datasets to RDF (normally from CSV).

Named Graphs and DCAT at Open Data Euskadi

This excerpt from a DCAT file shows the appropriate triples (Not all the triples are shown):

@prefix dcat: <> .
@prefix dc: <> .
@prefix rdf: <> .
@prefix rdfs: <> .
@prefix xsd: <> .
@prefix schema: <> .
@prefix void: <> .
@prefix sd: <> .

# The main dataset has two distributions: a CSV file and the RDF stored in the Triple Store
<> dcat:distribution 
	<> .

# CSV distribution	
  a dcat:Distribution ;
  dc:format [
    a dc:IMT ;
    rdfs:label "CSV" ;
    rdf:value "text/csv"
  ] ;
  dcat:byteSize 0.0 ;
  dcat:accessURL ""^^xsd:anyURI ;
  dc:title "Calidad del aire"@es .	
# Linked Data distribution
<> a dcat:Distribution, void:Dataset, schema:Distribution ;
sd:namedGraph <>;
void:sparqlEndpoint <> ;
dc:modified "2008-11-17"^^xsd:date ;
dc:title "Calidad del aire Linked Data"@es .

This means that SPARQL can be used to query data and metadata.