RDFS, Taxonomy, and Ontology

Chapter 4: Building the Foundation of the Semantic Web

Eng. Dr. Tiroshan Madushanka

Why Do We Need RDFS?

The Missing Vocabulary

The Problem with RDF Alone

While RDF can describe resources in a structured way, it lacks a critical component: vocabulary definition.

Key Questions RDF Cannot Answer:

  • Where is the class SLR defined? What does it look like?
  • Are there superclasses or subclasses of SLR?
  • What properties can be defined for this class?
  • What relationships exist between classes?

RDFS: The Solution

RDFS provides a language to create vocabularies that define classes, subclasses, properties, and their relationships—making the web truly machine-processable at a global level.

What is RDFS?

RDF Schema Explained

RDFS Definition

  • A vocabulary description language for RDF resources
  • Defines classes, subclasses, and properties
  • Associates properties with classes they describe
  • Adds semantics by specifying property meanings and value types
  • Written in RDF using the same triple/graph model

The Great News!

RDFS is written in RDF, so it's not as scary as you might think. It uses the same familiar structure you already know.

Key Insight

RDFS can be viewed as an extension of RDF. Together, RDF + RDFS push the Internet one step further toward machine-readability—a step that cannot be accomplished by RDF alone.

RDFS + RDF = Enhanced Reasoning

One More Step Toward Machine-Readability

A Simple Vocabulary Example

Consider a camera vocabulary with the following structure:

📷 Camera

💾 Digital
🎞️ Film

🔭 SLR
📸 Point-and-Shoot

Interactive Reasoning Example

Given:

  • Nikon D70 is an instance of SLR
  • SLR is a subclass of Digital
  • Digital is a subclass of Camera

Machine Can Conclude:

  • Nikon D70 is also a Digital camera
  • Nikon D70 is also a Camera
  • Search for "Digital" should include Nikon D70
Key Point: The machine performs this reasoning automatically by combining RDF triples with the RDFS vocabulary structure!

Core Elements of RDFS

The Building Blocks

Core Classes

  • rdfs:Resource - The root class of all classes
  • rdfs:Class - The class of classes
  • rdf:Property - The class of properties
  • rdfs:Datatype - The class of datatypes

Core Properties

  • rdfs:subClassOf - Defines class hierarchy
  • rdfs:subPropertyOf - Defines property hierarchy

Core Constraints

  • rdfs:domain - Specifies which class a property describes
  • rdfs:range - Specifies the type of values a property can have

Defining Classes in RDFS

Creating Your Vocabulary

Basic Class Definition

<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base="http://example.org/camera#"> <rdfs:Class rdf:ID="Camera"> </rdfs:Class> <rdfs:Class rdf:ID="Digital"> <rdfs:subClassOf rdf:resource="#Camera"/> </rdfs:Class> <rdfs:Class rdf:ID="SLR"> <rdfs:subClassOf rdf:resource="#Digital"/> </rdfs:Class> </rdf:RDF>

Key Points:

  • Use rdfs:Class to define a new class
  • Use rdf:ID to name the class
  • Use rdfs:subClassOf to create class hierarchies
  • Classes without subClassOf are direct subclasses of rdfs:Resource

Defining Properties in RDFS

Describing Class Characteristics

Property Definition with Domain and Range

<rdf:Property rdf:ID="owned_by"> <rdfs:domain rdf:resource="#SLR"/> <rdfs:range rdf:resource="#Photographer"/> </rdf:Property> <rdf:Property rdf:ID="has_spec"> <rdfs:domain rdf:resource="#SLR"/> <rdfs:range rdf:resource="#Specifications"/> </rdf:Property>

Understanding Domain and Range

  • rdfs:domain - Specifies which class this property can describe
  • rdfs:range - Specifies what type of values the property can have

Interpretation

Property owned_by:

  • Can only be used to describe instances of SLR class
  • Its value must be an instance of Photographer class

RDFS vs XML Schema

Different Purposes, Different Goals

XML Schema

  • Validates XML documents
  • Ensures syntax is legal
  • Defines allowed structure and data types
  • About validation and syntax
  • Document-centric

RDF Schema

  • Provides vocabulary for RDF
  • Defines classes and relationships
  • Associates properties with classes
  • About semantics and meaning
  • Knowledge-centric

Key Distinction

XML Schema: "Is this document syntactically correct?"

RDFS: "What does this mean, and how do concepts relate?"

RDFS is About Semantics

Semantics (meaning) is expressed by:

  • Specifying properties and their value types
  • Following the resource-property-value structure
  • Enabling machines to understand relationships

What is an Ontology?

From Vocabulary to Knowledge Representation

W3C Definition

"An ontology defines the terms used to describe and represent an area of knowledge."

Key Characteristics of Ontologies

  • Domain-specific - Represents a specific area of knowledge
  • Terms and relationships - Defines classes and how they relate
  • Hierarchical structure - Superclasses and subclasses
  • Properties - Describe features and attributes
  • Machine-understandable - Structured for computational processing

Examples of Domains

Photography, Medicine, Real Estate, Education, E-commerce, Biology, Music, etc.

Camera Ontology Structure:

  • Classes: Camera, Digital, Film, SLR, Point-and-Shoot, Photographer
  • Properties: owned_by, has_spec, pixel, model
  • Relationships: Hierarchies, ownership, specifications

Ontology vs Taxonomy

Understanding the Difference

Taxonomy

  • Classification-focused
  • Defines classes and subclasses
  • Hierarchical relationships
  • No property definitions
  • Simpler structure

Ontology

  • Classification + Properties
  • Defines classes and their properties
  • Multiple relationship types
  • Property constraints (domain/range)
  • Richer, more expressive

Simple Rule

Taxonomy: "What belongs where?" (Classification only)

Ontology: "What is it, what properties does it have, and how does it relate to others?"

Example

If you remove all properties from the camera ontology, leaving only classes and subclass relationships, you have a taxonomy, not an ontology.

Reasoning Power of RDFS

Simple, Yet Powerful

Four Main Reasoning Mechanisms

  • Domain inference - Determine resource type from property domain
  • Range inference - Determine value type from property range
  • Class hierarchy - Infer superclass memberships
  • Property hierarchy - Infer from subPropertyOf relationships

Interactive Example

Given RDF Statement:

NikonD70 owned_by LiyangYu

Machine Reasoning:

  • Fact: owned_by has domain SLR
  • Conclusion: NikonD70 is an SLR
  • Fact: SLR is subclass of Digital
  • Conclusion: NikonD70 is Digital
  • Fact: owned_by has range Photographer
  • Conclusion: LiyangYu is a Photographer
  • Fact: Photographer is subclass of Person
  • Conclusion: LiyangYu is a Person
Key Insight: All this reasoning happens automatically by following the resource-property-value structure!

Benefits of Ontologies

Why Build Them?

Major Benefits

  • Shared understanding - Common definitions of key concepts
  • Knowledge reuse - Share and extend domain knowledge
  • Explicit assumptions - Make domain assumptions clear
  • Machine understanding - Encode semantics for computers
  • Automatic processing - Enable large-scale intelligent agents

Real-World Impact

Ontologies enable:

  • Smarter search engines that understand meaning
  • Automatic data integration across systems
  • Intelligent assistants that reason about information
  • Semantic interoperability between applications

The Ultimate Goal

Make distributed information on the Internet machine-friendly and machine-processable, enabling a true Semantic Web where computers can understand, reason about, and act on information automatically.

Limitations of RDFS

Good, Better, Best - More is Needed

RDFS is Powerful, But...

There are gaps that prevent even richer ontologies and reasoning:

What RDFS Cannot Express

  • Class equivalence - Cannot say "SLR" and "Single-Lens-Reflex" are the same
  • Cardinality constraints - Cannot specify "exactly one pixel value"
  • Property characteristics - Cannot define transitive, symmetric properties
  • Class operations - Cannot create unions, intersections, complements
  • Disjointness - Cannot say "Digital and Film are mutually exclusive"
  • Property restrictions - Limited ability to constrain property values

The Solution: OWL

Web Ontology Language (OWL) extends RDFS to provide:

  • Richer vocabulary for complex relationships
  • More expressive constraints
  • Enhanced reasoning capabilities

Key Takeaways

Essential Concepts to Remember

Core Concepts

  • RDFS provides vocabulary that RDF alone cannot
  • Ontologies encode knowledge in machine-understandable ways
  • Semantics through structure - Resource-property-value enables reasoning
  • Hierarchies matter - Subclass/subproperty relationships enable inference
  • Domain and range are key to automatic type inference

The Big Picture

RDF: Describes resources in structured triples

RDFS: Defines vocabulary (classes, properties, relationships)

Together: Enable machines to understand and reason about web content

Result: One more critical step toward the Semantic Web vision

Next Step

Learn OWL (Web Ontology Language) to express even richer ontologies with advanced reasoning capabilities!

Thank You!

Questions & Discussion

Summary

  • RDFS extends RDF with vocabulary definition capabilities
  • Ontologies make domain knowledge explicit and machine-processable
  • Simple reasoning enables powerful inference on the Semantic Web
  • OWL provides even more expressive power (coming next!)

Remember

"The Semantic Web is not about making machines think like humans,
but about encoding knowledge so machines can help humans think better."

1 / 15