RDFS vs. Owl
We have introduced both RDFS and OWL as data modeling languages for describing RDF data. So which should you use? The quick answer is that although each has its place in the Semantic Web world, in general you should be using OWL.
This article does a more thorough comparison of the two modeling languages.
RDFS allows you to express the relationships between things by standardizing on a flexible, triple-based format and then providing a vocabulary (“keywords” such as rdf:type or rdfs:subClassOf) which can be used to say things.
OWL is similar, but bigger, better, and badder. OWL lets you say much more about your data model, it shows you how to work efficiently with database queries and automatic reasoners, and it provides useful annotations for bringing your data models into the real world.
Said another way: if RDFS is the stuff that passes for coffee in the American Northeast, OWL is a hot, churgling cup of Italian espresso.
1st Difference: Vocabulary
Of the differences between RDFS and OWL, the most important is just that OWL provides a far, far larger vocabulary that you can use to say things.
For example, OWL includes all your old friends from RDFS such as rdfs:type, rdfs:domain, and rdfs:subPropertyOf. However, OWL also gives you new and better friends! For example, OWL lets you describe you data in terms of set operations:
Example:Mother owl:unionOf (Example:Parent, Example:Woman)
It lets you define equivalences across databases:
AcmeCompany:JohnSmith owl:sameAs PersonalDatabase:JohnQSmith
It lets you restrict property values:
Example:MyState owl:allValuesFrom (State:NewYork, State:California, …)
We won’t cover any of these predicates right now because, in fact, OWL provides so much new, sophisticated vocabulary to use in data modeling and reasoning that gets its own lesson!
2nd Difference: Rigidity
Another major difference is that unlike RDFS, OWL not only tells you how you can use certain vocabulary, it actually tells you how you cannot use it. By contrast, RDFS gives you an anything goes world in which you can add pretty much any triple you want.
For example, in RDFS, anything you feel like can be an instance of rdfs:Class. You might decide to say that Beagle is an rdfs:Class and then say that Fido is an instance of Beagle:
Example: Beagle rdf:Type rdfs:Class
Example:Fido rdf:Type Example: Beagle
Next, you might decide that you would like to say things about beagles, perhaps you want to say that Beagle is an instance of dogs bred in England:
Example:Beagle rdf:Type Example:BreedsBredInEngland
Example: BreedsBredInEngland rdf:Type rdfs:Class
The interesting thing in this example is that Example:Beagle is being used as both a class and an instance. Beagle is a class that Fido is a member of, but Beagle is itself a member of another class: Things Bred in England.
In RDFS, all this is perfectly legal because RDFS doesn’t really constrain which statements you can and cannot insert. In OWL, by contrast, or at least in some flavors of OWL, the above statements are actually not legal: you’re simply not allowed to say that something can be both a class and an instance.
This is then a second major difference between RDFS and OWL. RDFS enables a free-for-all, anything goes kind of world full of the Wild West, Speak-Easies, and Salvador Dali. The world of OWL imposes a much more rigid structure.
Constraints and Computability
Why would OWL restrict you in this way? The reason has to do with how much computing power it actually takes to implement the kinds of inferences which all this new vocabulary enables.
For example, if I know that Example:Frank is of rdf:type Example:Human, and Example:Human is a rdfs:subClassOf Example:Animal, then I can now infer that Example:Frank is also of type Example:Animal.
It turns out that some kinds of these inferences can be run really quickly. Others can take a REALLY long time to run even on today’s fastest computers. Other kinds of inferences will never be solvable by ANY computer.
Unlike RDFS, OWL lets you decide how expressive you want to be, given the computational realities involved. In fact, OWL lets you restrict your data modeling options to those that enable faster search queries, those that enable conceptual reasoning, or those that can be easily implemented with rules engines. For more details, see the lesson on Flavors of OWL.
3rd Difference: Annotations, the meta-meta-data
Suppose that you’ve spent the last hour building an ontology that describes your radio manufacturing business. During lunch, your task is to build an ontology for your clock manufacturing business. This afternoon, after a nice coffee, your boss now tells you that you’ll have to build an ontology for your highly profitable clock-radio business. Is there a way to easily reuse the morning’s work?
OWL makes doing things like this very, very easy. Owl:Import is what you would use in the clock-radio situation, but OWL also gives you a rich variety of annotations such as owl:versionInfo, owl:backwardsCompatibleWith, and owl:deprecatedProperty, which can easily be used link data models together into a mutually coherent whole.
Unlike RDFS, OWL is sure to satisfy all of your meta-meta-data-modeling needs.
OWL gives you a much larger vocabulary to play with, which makes it easy to say anything you might want to say about your data model. It even allows you to tailor what you say based on the computational realities of today’s computers and to optimize for particular applications (for search queries, for example.) Further, OWL allows you to easily express the relationships between different ontologies using a standard annotation framework.
All these are advantages as compared to RDFS, and are typically worth the extra effort it takes to familiarize yourself with them.
You’ll still see RDFS used – often for older data models or smaller ontologies – so it’s useful to have a familiarity with it. For yourself, stick to OWL. Next lesson: Flavors of OWL