Tuesday October 20, 2009Visualizing RDF and OWL data modelsThe data models for Resource Description Framework (RDF) and Web Ontology Language (OWL) can be a bit difficult to understand, even at the simplest level. Here are some visualizations (and explanations) I've found useful: I'd be delighted to hear about other ways of thinking about this. All comments and/or corrections are welcome...The most obvious representation of RDF (and thereby, OWL) is a rectangular table where each row encodes a simple "fact". For example, here is a trivial ontology:
Dog is_a Thing. Cat is_a Thing. Cat teases Dog. Dog chases Cat. As pointed out in Chapter 3 of Semantic Web Programming, the tabular representation of RDF statements can be visualized as points in an abstract three-dimensional (3D) space:
![]() Ontologies are an application of directed graphs: each RDF triple is an edge, each literal or URI is a node. Diagramming (a subset of) the graph can allow readers to follow connections, recognize patterns, etc. Here is our sample ontology, as drawn by (and encoded for) the Graphviz utility.
Although RDF is mostly concerned with entities and relations, OWL raises the level of discourse to include classes, restrictions, and more. In particular, OWL structures ontologies as class hierarchies, decorated by other relations. This simplifies the notation, because "is_a" relations can be expressed by indentation (etc). Here is an OWLish (ASCII Art) representation of our ontology: Thing | |`-- Cat (teases Dog) `-- Dog (chases Cat) Each RDF relation defines a mapping between two entities. OWL provides the ability to restrict the domain and range sets of mappings, providing protections analogous to the data type and foreign key constraints found in an RDBMS.
![]() Most production ontologies make use of pre-defined collections of triples. Indeed, making use of such collections is widely considered to be a Best Practice, because it reduces error, increases interoperability, etc. Some of these collections (eg, rdf, rdfs, owl) define general, structural relations. These are used pretty universally, though it's common to pick and choose among owl subsets. Other pre-defined collections (eg, bibo, core, foaf) define topical relations of use in particular domains of discourse. For example, foaf contains relations pertaining to human interactions, while bibo and core handle bibliographic information. If the relevant pre-defined collections of triples don't cover everything (or cover them in the desired manner), an ontology may define some local, structural triples. Finally, after the ontology is loaded into a triplestore, it will be "populated" by instances (eg, "Berners-Lee knows Hendler"):
![]()
Visualizing RDF and OWL data models
- posted at Tue, 20 Oct, 13:52 Pacific
| «e»
| TrackBack
|