Resources and Objects: RDF and OOP talk about different things

Here’s a thing that I think has been at the root of some long discussions that I have been involved in where people involved in modelling data just don’t seem to agree on what goes in to a domain model, or on fine details of definitions. If it seems wrong or trivial to you, I’ld really appreciate any comments along the lines of ‘nope, you’ve misunderstood that …’ or ‘nope, everyone knows this and works around it, the disagreement must have been about something else’.

What I’m thinking causes these long discussions is that RDF and Object Oriented modeling methods (e.g. UML) talk about different things with the same terms. The resulting confusion is somewhat like a speaker of British English asking for something to be tabled in a meeting with folk from the US only to be mystified and offended when it is ignored

table transitive verb

1 a [US] to remove (something, such as a parliamentary motion) from consideration indefinitely
b British to place on the agenda

Merriam-Webster dictionary definition of table

RDF starts with resources, which are the things being described. Although identified with web identifiers (URIs, IRIs) they can be concrete objects, concepts, imaginary beings, in fact “anything that can be identified”. A relationship between a resource and something else can be asserted as being a property of the described resource. Resources of the same type can be grouped into classes so that a property can be associated with all instances of that type of resource. For example, in resources of type Person have a property name that is a string.In RDF terms I am a resource identified by <> of type <>. I am an instance of a <>. Note that while I am identified by a URI you cannot retrieve me via that URI, instead you get sent a different resource with a different URI, that is a description of me.

Object Oriented methods start with objects, which are constructs that live only in information systems; the most important type of object in metadata contexts is a data object that is a description of something. Objects of the same type can be created through the definition of a class that defines the properties and methods of a type of object. While it is common practice to name object classes after the real-world thing that they represent, e.g. Person, when we create an object instance of such a class we do not create a person in the real world. The identifier for an object instance of type person is the identifier of the artifact in the computer.

So in RDF we have real things and write descriptions of them; in object oriented methods we have data things that we define. But we use terms like class, type, object, resource, instance when talking about both.

Context and shared understanding within communities is enough to avoid confusion between RDF and Object Oriented terms most of the time, but in JSON-LD they collide. In JSON-LD I can express the information about myself provided above as a description about me, or in terms of the W3C web architecture a representation of me.

{ "@context": {
        "sdo": ""
    "@id": "",
    "@type": "sdo:Person",
    "sdo:name": "Phil Barker",
    "sdo:url": ""

This translates to RDFXML as

<?xml version="1.0" encoding="UTF-8"?>
  <rdf:Description rdf:about="">
    <rdf:type rdf:resource=""/>
    <sdo:name>Phil Barker</sdo:name>

I could represent the UML class diagram for the JSON data object as something like: I could represent the UML class diagram for the JSON data object as something like:Note that @id and @type, which identify and provide a type for the JSON node, refer to objects in the real world for RDF.

Why does this matter? Well, it’s one thing to say that you like/don’t like me, it’s another to say that you like/don’t like a description of me. It’s one thing to make a copy of a description of me, another to make a copy of me.  We can make descriptions of things in RDF and make assertions about things in RDF, but if we say that a thing in our RDF model is a Description of Assertion, then we had better have a reason for wanting to be so meta as using RDF to make descriptions of Descriptions and assertions about Assertions. But when someone suggests that an RDF model should have PersonDescription in a oval in place of Person, maybe they really want a PersonDescription in box in a different type of entity relationship diagram.

One thought on “Resources and Objects: RDF and OOP talk about different things

Comments are closed.