Simple Linked Data Deployment Tutorial

Kingsley Uyi Idehen
Jan 5, 2018 · 7 min read

Here is a simple tutorial that demonstrates the fact that Linked Data deployment is easier than is generally assumed.

Why?

I want observations that I document to be "webby", or "web-like", in nature; i.e., I want entity relationships that can be navigated by clicking on hyperlinks (HTTP URIs) using a follow-your-nose pattern.

What?

Describe how several entities are related, leveraging the data connectivity and access prowess of Linked Data and the descriptive power of RDF sentences:

  1. a lady named “Alice”
  2. a man named “Bob”
  3. a car manufacturer named “Example Cars & Co”
  4. an unbranded red automobile (car)
Visualizing Entity Relationship Types [Live Link]

How?

To achieve my goal, I have to adhere to a few fundamental principles:

  1. Identify (name) entities using HTTP URIs so that anyone can look up their description documents — i.e., leverage the fact that HTTP URIs resolve to documents.
  2. Use RDF Language subject→predicate→object structured sentences/statements (using a variety of notations) to store entity descriptions in a document that’s also identified by an HTTP URI (more specifically in this case, a URL, since we are dealing with a document on an HTTP network).
  3. Repeat the process whenever I encounter something of interest — i.e., take notes about what I observe using simple RDF Language sentences.
  1. Create a folder on my local drive.
  2. Create a document for each entity that I plan to describe — doc1.ttl for “Bob” [1], doc2.ttl for “Alice”[2], org.ttl for “Example Cars & Co” [3], product.ttl for the automobile [4].
  3. Add content in the form of RDF statements (triples) that represent how these entities are related to each document.
  4. Copy all of my files to an HTTP accessible folder that’s published to a public (e.g., World Wide Web) or private (e.g., Intranet) network.
  5. Done!

Turtle Statements (using Nanotation)

doc1.ttl — about Bob (friend of Alice who seeks a Car)

{
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix gr: <http://purl.org/goodrelations/v1#> .
@prefix wdrs: <http://www.w3.org/2007/05/powder-s#> .
<>
a foaf:Document ;
foaf:name "A Document that describes a Person literally identified as 'Bob'" ;
dcterms:description "A collection of RDF sentences that describe a Person literally identified (or labeled) as 'Bob'" ;
foaf:primaryTopic <#bob> .
<#bob>
a foaf:Person ;
foaf:name "Bob" ;
foaf:depiction <http://www.silhouettegraphics.net/wp-content/uploads/2013/10/young-man-silhouettegraphics-.jpg> ;
gr:seeks <product.ttl#CoolRedCar> ;
foaf:knows <doc2.ttl#alice> ;
wdrs:describedby <> .
}
OpenLink Structured Data Sniffer rendering of RDF Sentences that describe ‘Bob’

doc2.ttl — about Alice (friend of Bob who is employed by a Car Manufacturer)

{
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix wdrs: <http://www.w3.org/2007/05/powder-s#> .
@prefix rel: <http://purl.org/vocab/relationship/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix gr: <http://purl.org/goodrelations/v1#> .
<>
a foaf:Document ;
foaf:name "A Document that describes a Person literally identified as 'Alice'" ;
dcterms:description "A collection of RDF sentences that describe a Person literally identified (or labeled) as 'Alice'" ;
foaf:primaryTopic <#alice> .
<#alice>
rdf:type foaf:Person ;
foaf:name "Alice" ;
foaf:knows <doc1.ttl#bob> ;
foaf:depiction <http://clipart-library.com/images/kiMb8ggKT.jpg> ;
rel:employedBy <org.ttl#exampleCars> ;
wdrs:describedby <> .
}
OpenLink Structured Data Sniffer rendering of RDF Sentences that describe ‘Alice’

org.ttl — about Car Maker (who manufactures Cars and employs Alice)

{
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix gr: <http://purl.org/goodrelations/v1#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix gr: <http://purl.org/goodrelations/v1#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix wdrs: <http://www.w3.org/2007/05/powder-s#> .
<>
a foaf:Document ;
foaf:name "A Document that describes an Organization literally identified as 'Example Cars & Co.'" ;
dcterms:description "A collection of RDF sentences that describe an Organization literally identified (or labeled) as 'Example Cars & Co.'" ;
foaf:primaryTopic <#exampleCars> .
<#exampleCars>
rdf:type gr:BusinessEntity , foaf:Organization ;
foaf:name "Example Cars & Co." ;
foaf:depiction <https://thumb1.shutterstock.com/display_pic_with_logo/3648824/532862638/stock-vector-silhouette-automated-production-line-robotic-factory-banner-532862638.jpg> ;
foaf:made <product.ttl#CoolRedCar> ;
wdrs:describedby <> .
}
OpenLink Structured Data Sniffer rendering of RDF Sentences that describe ‘Examples Car & Co.’ the Car Manufacturer

product.ttl — about Car (Product made by Car Maker that employs Alice)

{
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix gr: <http://purl.org/goodrelations/v1#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix wdrs: <http://www.w3.org/2007/05/powder-s#> .
<>
a foaf:Document ;
foaf:name "A Document that describes a Product literally identified as 'Gift Wrapped Cool Red Car -- Brand Unknown'" ;
dcterms:description "A collection of RDF sentences that describe a Product literally identified (or labeled) as 'Gift Wrapped Cool Red Car -- Brand Unknown'" ;
foaf:primaryTopic <#CoolRedCar> .
<#CoolRedCar>
rdf:type gr:ProductOrService ;
foaf:name "Gift Wrapped Cool Red Car -- Brand Unknown" ;
foaf:depiction <http://highroaddigital.com/wp-content/uploads/2015/01/wonanewcar.jpg> ;
foaf:maker <org.ttl#exampleCars> ;
wdrs:describedby <> .
}
OpenLink Structured Data Sniffer rendering of RDF Sentences that describe ‘Gift Wrapped — Cool Red Car’

illustration.ttl — an additional document functioning as an index of all the entity description documents

{
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ns4: <http://kingsley.idehen.net/dataspace/person/kidehen#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix wdrs: <http://www.w3.org/2007/05/powder-s#> .
@prefix gr: <http://purl.org/goodrelations/v1#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
<>
a foaf:Document ;
foaf:name "A Document about illustrating a simple Linked Data Deployment exercise" ;
dcterms:description "A collection of RDF sentences that describe a Linked Data Deployment exercise" ;
foaf:depiction <http://kingsley.idehen.net/DAV/home/kidehen/Public/Linked%20Data%20Documents/Tutorials/slide38_linked_data_network_v2_SPO%20_latest_relative_uris.png> ;
foaf:topic <GlossaryOfTerms.ttl>, <doc1.ttl>, <doc2.ttl>, <product.ttl>, <org.ttl> .
}
OpenLink Structured Data Sniffer rendering of RDF Sentences that describe ‘Illustration of Entity Relationships and the RDF documents from which they originate’

Additional Notes

I am using Turtle (due to its human readability) as the notation for inscribing RDF statements to my documents.

By using nanotation, I am able to use this document (this Medium post) as a 5-Star Linked Data source, as you will see if you install our Structured Data Sniffer extension and/or via the depiction below.

Using Relative URIs is the key to simple Linked Data Deployment. The HTTP Fragment Identifier is a powerful feature that enables HTTP URIs (Hyperlinks) to identify anything. More importantly, it enables their use when identifying the subject, predicate, and object of an RDF sentence; i.e., this is what makes the notion of a Semantic Web viable.

Due to what’s outlined above, I am to deploy this Linked Data Deployment tutorial using the age-old File Create, Save, Copy, and Share pattern across the proprietary storage services provided by Dropbox, Google Drive, Microsoft OneDrive, Amazon S3, etc.

Conclusion

By following the steps outlined above, you would have successfully described how four entities (two people, a company, and a product) are related. Even better, you would have achieved the goal of making your effort native to the Web; i.e., your document viewers (human or bots) can simply follow links presented in your documents to better understand the information encoded in the entity relationships you’ve represented in RDF sentences.

At this juncture, I strongly encourage you to watch this video excerpt from a recent documentary about Tim Berners-Lee that sheds light on the inspiration and insights that lead to the creation of the platform known as the World Wide Web.

Segment from Documentary that sheds light on the importance of sentences to the notion of global information sharing

Links

Related

Here are some tools that enable viewing and exploration of Linked Data using existing browsers:

OpenLink Software Blog

Blog Publication Hub focused on Data Access, Integration, Flow, and Management Tech

Kingsley Uyi Idehen

Written by

Founder & CEO, OpenLink Software — provider of Secure, High-Performance, and Cross-Platform Data Access, Integration, Virtualization, and Management Technology.

OpenLink Software Blog

Blog Publication Hub focused on Data Access, Integration, Flow, and Management Tech

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade