Skip to main content

Ontologies

Data structures in triples

In linked data, everything is described in triples. This includes the things that exist, what types of things exist, and what sort of properties they can have.

data structures are also described with triples

Here the property 'has friend' is described as a Property and 'Person' is described as a Class. And the value of has friend is expected to be a Person

And herein lies a big benefit of using linked data: If you have a tool that can create and manage triples, you immediately have tool for managing all your data and your data structures at once! And since all this information has the same format and exists in the same connected graph, you can easily change your data and your data structures on the fly.

Ontologies

The types of things that can exist (classes) and how those things can be connected (properties) are typically grouped together in an ontology.

An ontology therefor describes a set of things that can exist and how those things can be related to each other for a specific context or knowledge domain.

For example there is an ontology for people, projects, music collections, countries, etc.

Core ontologies

Some of the most common ontologies you will see are RDF, RDFS, OWL and SHACL.

You can also explore these ontologies via their pages on lincd.org. See RDF, RDFS, OWL and SHACL

RDF and RDFS have been defined by the W3C to give users some core building blocks for working with linked data.

For example, RDF defines rdf:type and rdf:Property.

  • rdf:type is used for stating what something is. In the examples given before the is a property would actually in practice be replaced with the property rdf:type. For example Rene rdf:type Person.

  • rdf:Property is the type of any node that occurs as the predicate in a triple. For example Rene has friend Carlen, infers that has friend rdf:type rdf:Property.

RDFS was added later and introduced some other core terms:

  • rdfs:Class is the type of any value of rdf:type. For example, if we have Rene rdf:type Person, then that automatically means that Person rdf:type rdfs:Class.
  • rdfs:label is a property that can be used to give something a name or 'label'. The value is usually a literal.

Prefixes

The notations used above, like rdfs:label, are called prefixed URI's.

When representing linked data in textual format, you may get the same (part of an) URI repeated over and over again. To save space and increase readability, URI's are often shortened. Such a shortened URI is called a prefixed URI.

For example, rdfs:label stands for the full URI http://www.w3.org/2000/01/rdf-schema#label.

Here rdfs is called the prefix, label the suffix, and rdfs:label is a prefixed URI.

What's next?

You have reached the end of this linked data introduction. In the near future this guide will include more details of how you can work with nodes and triples/quads with lincd.js. For now, we'd like to refer you to the tutorial to explore that.

Alternatively, you can also dive into the linked code guides. Since lincd.js mostly takes care of the graph for you, you'll find that you rarely need to touch individual nodes or triples when building linked data apps. So the introduction we just covered should be all you need for now.