RDF Primer

A surprisingly helpful document!


  • Resource Description Framework
  • RDF describes resources which are “things in the world”
    • Physical things, documents, concepts, numbers, strings
    • Synonymous with “entity”
  • Denoted by
    • IRI (Internationalized REsource ID): International friendly URL thing; resources denoted by IRIs are “referents”
    • Literal: Usually a string with a ^^type hint; resources denoted by Literals are “the literal value”
  • Linked Data is the result of resources as expressed in RDF linking with each other
  • RDF Data model
    • AKA a “property” or a “statement”
    • Visualizable as a collection of nodes (subjects / objects) interlinked by arcs (predicates)
    • In triples, there are 3 types of data:
    • Literals: “zh”, “3.14”
    • Blank Nodes: Can only appear in object position, but effectively an anonyous node
    • IRIs: appear in all possible positions
    • To make RDF statements possible, we need to define vocabularies
      • We define vocabularies with RDFs (RDF11-SCHEMA) or OWL (Web Ontology Language)
      • CLASSes clarify resources
      • TYPE specify class instance relationships
      • DOMAIN specifies classes OK for a trip to take
    • Popular Vocabularies: FOAF, Dublin Core, SKOS
    • Writing Graphs is accomplished by a number of serialization formats
      • N-TRIPLES: Fully-qualified IRIs to define triple statements
      • TURTLE: Extends N-Triples, but allows for indentation based grouping
      • Specifies blank nodes with _:attr
      • TRIG: Turtle with namespacing
      • NQUDS: TRIG, but with the graph designation in the 4th slot
      • JSON-LD: JSON syntax for RDF and data set that link to other JSON objects that are used to transform into RDF-compatible definitions
      • This seems really powerful. Take an arbitrary JSON object
      • Define another JSON object that’s (effectively) a presenter
      • The presenter mutates the first object to be compliant with vocabularies
      • RDF / XML allows the XML noisy way of nesting things
      • RDFa (RDF nestled in HTML)
    • Reaction

      This was pretty helpful and gave me a list of useful terms again. I don’t know why the TURTLE / RDFXML discussion sunk in this time. Statements exist but they serialize according to a variety of possibilities. Nevertheless, writing these statements by hand seems nutso.