OWL & SHACL - Why two syntaxes?


… I need clarification here.
I once looked at it, to find out what the difference is, and my conclusion was:
They describe the same thing, using different syntax, and they are used for different things:
OWL for (logical/ontolgical) truth finding.
SHACL for checking if a heap of data has the correct “shape”/form.

I understand that these are two different things, but do not understand why we cant use the same syntax/the same specification for both, and I was not able to find an explanation for this anywhere.

If it is really the same data, can I generate one from the other?


TL:DR: You are right with your conclusion about what they do.

This is indeed very confusing in the beginning, I did a presentation about this a while ago and I still plan to do a screencast and put it on YouTube as well one day but didn’t had the time yet.

For the moment I can only recommend you to have a look at the presentation here. Especially the following pages:

  • 5: Basic Vocabulary
  • 6: RDF & RDF Schema
  • 9: OWL
  • 12: SHACL & ShEx

If you have a look at the time you will see that RDF and RDFS were defined in 2004 already, as well as the first OWL version, which had multiple technical problems. OWL2 came 2009 and fixed these problems mostly. Then it took a looong time for IT standards: SHACL became a standard in 2017.

Now before I explain why, let’s have a look at slide 14 and the “Open World Assumption”. This is very essential in RDF and is important to understand. Followed by slide 15 “How is it used?” and on 16 “What happened”. So SHACL is basically a reaction on the misunderstandings that happened with RDFS & especially OWL. OWL can be very useful but many people (me included) initially understand OWL wrong. They think of it as a language to define restrictions, which is totally not what OWL is doing. But SHACL can provide restrictions, so this finally fixes something that was missing as a standard in the RDF world. (There were other approaches to do it which were vendor specific and not a standard before.)

So what is the point of RDFS and OWL then? Let’s try the example we talked about in your other question. We could define a subproperty of skos:note:

  rdfs:subPropertyOf skos:note ;
  rdfs:domain example:MyClassA .

When you have a triplestore with reasoning enabled you could now ask for:

  • example:note: that would not require reasoning
  • skos:note: that would require reasoning

But you can also query all example:MyClassA with reasoning enabled because the reasoner would conclude that from the second line in the example above.

So: RDFS and OWL can figure out things in the data that are not explicit stated in triples but defined in the schema and/or ontology. This is reasoning. It can only do limited validation of data.

SHACL validates data. It checks if data validates to the shape defined and can tell you what parts don’t. These shapes can be quite powerful, far more than what was possible with OWL. It can do some limited form of reasoning, see the link below.

I was not part of the SHACL working group but I heard that there was quite some drama between the OWL camp and the people that were interested in doing validation. I found this document that explains the similarities and differences but I have to read that carefully once myself first.

I guess there are some good technical reasons and some “soft” reasons why the two standards are different. Defining standards is hard because a large group of people with different opinions and motivations try to agree on something, so this might not always make sense when we look at it as outsiders.

RDFS & OWL are for things that are universal, like stuff we can all agree on. SHACL is for your particular domain/application, it helps defining how you and your team use a particular schema with your data.

What happens will be interesting to see, I see a lot of uptake of SHACL these days, some think it might replace OWL in most cases, others don’t.


This is simply historic. Take a look at this blog and also this one.

And, yes, you can generate one from another - to some extent.


Hi Irene,

Thanks for the links, I did read your posts with great interest :slight_smile: