notebook/notes/data-models/rdf.md

18 KiB

title TARGET DECK FILE TAGS tags
RDF Obsidian::STEM data_model::rdf
data_model
rdf

Overview

The Resource Description Framework (RDF) is the foundational representation language of the Semantic Web. The basic building block of RDF is the triple containing a subject, predicate, and object. Global identifiers of resources are represented as uri (or, more generally, IRIs). These URIs can be expressed more compactly as uri#CURIEs.

A graph is a set of triples. A named graph is a particular set of triples with an associated name. When using named graphs, the term quads is often used in favor of triples. This refers to the original triple along with the name of the graph the triple is associated with.

%%ANKI Basic Which organization standardized RDF? Back: W3C Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What is W3C an acronym for? Back: World Wide Web Consortium. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What is RDF an acronym for? Back: Resource Description Framework. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What is considered the basic representation language of the Semantic Web? Back: RDF. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Cloze With respect to RDF, a {resource} is {anything representable on the web}. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What aggregate concept is considered the basic building block of RDF? Back: The triple. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What three components make up an RDF triple? Back: The subject, predicate, and object. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Cloze In RDF, a triple is a ({subject}, {predicate}, {object}) tuple. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Cloze A {subject} is to a semantic triple as a row number is to a relation record. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Cloze A {predicate} is to a semantic triple as an attribute is to a relation record. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Cloze An {object} is to a semantic triple as a value is to a relation record. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic Consider converting the following table to a triple. What is the subject? !triple-table-repr.png Back: Row 2 Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic Consider converting the following table to a triple. What is the object? !triple-table-repr.png Back: Hamlet Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic Consider converting the following table to a triple. What is the predicate? !triple-table-repr.png Back: Title Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic RDF identifiers use what encoding? Back: IRIs. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic How does RDF define a graph? Back: As a set of triples. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic How does RDF define a named graph? Back: As a graph (a set of triples) with a name. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Cloze {1:Triples} are to {2:graphs} whereas {2:quads} are to {1:named graphs}. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What name is given to the members of a triple? Back: "Subject", "predicate", and "object". Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What name is given to the members of a quad? Back: "Subject", "predicate", "object", and "graph". Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

The RDF data model was designed from the beginning with federation in mind. Because every RDF store represents RDF data in the same way (i.e. as a set of triples), federation is as simple as combining the commonly encoded data into a single store before querying.

%%ANKI Basic What mechanism makes RDF data federation easy? Back: Every source communicates data in the same way (i.e. as a set of triples). Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020. Tags: data_model::federation

END%%

%%ANKI Basic In the context of RDF, what does federation refer to? Back: The combining of multiple RDF stores into a single (possibly virtual) view. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020. Tags: data_model::federation

END%%

%%ANKI Basic What does the federated graph refer to? Back: The graph produced by combining various federated data sources. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020. Tags: data_model::federation

END%%

Blank Nodes

A blank node (bnode) is a node in an RDF graph representing a resource for which a uri is not specified. That is, the represented resource is anonymous. Such a node can only be used as a subject or object in an RDF triple.

%%ANKI Basic What is a blank node? Back: A node in an RDF graph representing a resource with an unspecified IRI. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Cloze A {bnode} is shorthand for a {blank node}. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic Which quantifier does a bnode correspond to? Back: \exists Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What name is given to a node with an unspecified URI? Back: A blank node. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What "position" in an RDF triple can a blank node take on? Back: Either the subject or object. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What "position" in an RDF triple is a blank node prohibited to take on? Back: The predicate. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

Serializations

The original syntax and standard for writing RDF was RDF/XML. Turtle is an alternative, more human-readable, syntax. Besides these two exist many others.

%%ANKI Basic Which RDF serialization is most widely used? Back: Turtle. Reference: “Resource Description Framework,” in Wikipedia, November 25, 2024, https://en.wikipedia.org/w/index.php?title=Resource_Description_Framework.

END%%

%%ANKI Basic Why is Turtle named the way it is? Back: It is an "acronym" for Terse RDF Triple Language. Reference: “Resource Description Framework,” in Wikipedia, November 25, 2024, https://en.wikipedia.org/w/index.php?title=Resource_Description_Framework.

END%%

%%ANKI Basic What is RDF/XML a container for? Back: RDF data. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What is Turtle a container for? Back: RDF data. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Cloze RDF is a {data model} whereas XML is a {serialization format}. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020. Tags: serialization::xml

END%%

%%ANKI Cloze RDF is a {data model} whereas Turtle is a {serialization format}. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic How might RDF and XML relate to one another? Back: XML can be used to serialize RDF. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020. Tags: serialization::xml

END%%

SPARQL

SPARQL (SPARQL Protocol and RDF Query Language) is the standard way to access RDF data using a query language. Query patterns are represented in a variant of Turtle, the most ubiquitous language used to express RDF itself.

A server for the SPARQL protocol is called a SPARQL endpoint. It accepts SPARQL queries and returns results, according to the details of the protocol.

%%ANKI Basic SPARQL syntax most closely resembles which RDF serialization format? Back: Turtle. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What is the standard means of querying an RDF store? Back: SPARQL. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What is SPARQL an acronym for? Back: SPARQL Protocol and RDF Query Language. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Cloze {1:SPARQL} is to {2:RDF} as {2:SQL} is to {1:RDBMS}. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic The following snippet is an example of what language?

SELECT ?movie WHERE {:JamesDean :playedIn ?movie}

Back: SPARQL Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What do the :s indicate in the following query?

SELECT ?movie WHERE {:JamesDean :playedIn ?movie}

Back: The default namespace. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic How are namespaces introduced in a SPARQL query? Back: With the : character. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What do the ?s indicate in the following query?

SELECT ?movie WHERE {:JamesDean :playedIn ?movie}

Back: Variables to be matched against. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic How are variables introduced in a SPARQL query? Back: With the ? character. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What do the curly braces ({}) indicate in the following query?

SELECT ?movie WHERE {:JamesDean :playedIn ?movie}

Back: A graph pattern. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic How are graph patterns introduced in a SPARQL query? Back: With the { and } characters. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic In SPARQL, what is a graph pattern? Back: A graph with wildcards, used to match against a data graph. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Cloze A {server for the SPARQL protocol} is called a {SPARQL endpoint}. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What is a SPARQL endpoint? Back: A server that can respond to SPARQL queries. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

%%ANKI Basic What does Allemang et al. describe as the most web-friendly way to provide access to RDF data? Back: Exposing a SPARQL endpoint to the data. Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. Semantic Web for the Working Ontologist. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020.

END%%

Bibliography