views:

1391

answers:

6

I am trying to grasp the concept of Semantic Web. I am finding it hard to understand what exactly is the difference between RDF and OWL. Is OWL an extension of RDF or these two are totally different technologies?

+3  A: 

RDF is a way to define a triple 'subject','predicate', 'value'. For example, if I want to say,

"my name is Pierre"

I would write

<mail:[email protected]> <foaf:name> "Pierre"

See the <foaf:name> ? it is part of the FOAF ontology. An ontology is a formal way to describe the properties, the classes of a given subject and OWL is a (RDF) way to define an ontology.

You use C++, Java, etc... to define a Class, a subclass, a field, etc...

class Person
{
String email_as_id;
String name;
}

RDF uses OWL to define this kind of statements.

Another place to ask this kind of question: http://www.semanticoverflow.com/

Pierre
All this stackexchange based websites... where do they find the money to run ?
Stefano Borini
Disagree with: "RDF uses OWL to define this kind of statements". RDF does not use OWL in any way. This is other way around: OWL uses RDF Schema which uses RDF.
AlexKR
OK, @AlexKR, I agree.
Pierre
@Stefano Where do they find people to run, that's the real question.
Pascal Thivent
+4  A: 
AlexKR
+12  A: 

The semantic web comes in layers. This is a quick summary of the ones I think you're interested in.

Update: Please note that RDFS is used to define the structure of the data, not OWL. OWL describes semantic relationships which normal programming, such as a C struct, isn't fussed about and is closer to AI research & set theory.

Triples & URIs

Subject - Predicate - Object

These describe a single fact. Generally URI's are used for the subject and predicate. The object is either another URI or a literal such as a number or string. Literals can have a type (which is also a URI), and they can also have a language. Yes, this means triples can have up to 5 bits of data!

For example a triple might describe the fact that Charles is Harrys father.

<http://example.com/person/harry&gt; <http://familyontology.net/1.0#hasFather&gt; <http://example.com/person/charles&gt; .

Triples are database normalisation taken to a logical extreme. The have the advantage that you can load triples from many sources into one database with no reconfiguration.

RDF and RDFS

The next layer is RDF - The Resource Description Framework. RDF defines some extra structure to triples. The most important thing RDF defines is a predicate called "rdf:type". This is used to say that things are of certain types. Everyone uses rdf:type which makes it very useful.

RDFS (RDF Schema) defines some classes which represent the concept of subjects, objects, predicates etc. This means you can start making statements about classes of thing, and types of relationship. A the most simple level you can state things like http://familyontology.net/1.0#hasFather is a relationship between a person and a person. It also allows you to describe in human readable text the meaning of a relationship or a class. This is a schema. It tells you legal uses of various classes and relationships. It is also used to indicate that a class or property is a sub-type of a more general type. For example "HumanParent" is a subclass of "Person". "Loves" is a sub-class of "Knows".

RDF Serialisations

RDF can be exported in a number of file formats. The most common is RDF+XML but this has some weaknesses.

N3 is a non-XML format which is easier to read, and there's some subsets (Turtle and N-Triples) which are stricter.

It's important to know that RDF is a way of working with triples, NOT the file formats.

XSD

XSD is a namespace mostly used to describe property types, like dates, integers and so forth. It's generally seen in RDF data identifying the specific type of a literal. It's also used in XML schemas, which is a slightly different kettle of fish.

OWL

OWL adds semantics to the schema. It allows you to specify far more about the properties and classes. It is also expressed in triples. For example, it can indicate that "If A isMarriedTo B" then this implies "B isMarriedTo A". Or that if "C isAncestorOf D" and "D isAncestorOf E" then "C isAncestorOf B". Another useful thing owl adds is the ability to say two things are the same, this is very helpful for joining up data expressed in different schamas. You can say that relationship "sired" in one schema is owl:sameAs "fathered" in some other schema. You can also use it to say two things are the same, such as the "Elvis Presley" on wikipedia is the same one on the BBC. This is very exciting as it means you can start joining up data from multiple sites (this is "Linked Data").

You can also use the OWL to start creating new facts, such as C isAncestorOf E".

Christopher Gutteridge
Great summary, probably the most practical explanation I've read on this yet.
Zsolt Török
I'm the web-tech that ends up trying to make this stuff useful day to day for the thinkers *grin*
Christopher Gutteridge
Here is an image of the Semantic Web layers : http://www.w3.org/2001/12/semweb-fin/swlevels.pngJust for reference.
Timo Westkämper
+1  A: 

Is OWL an extension of RDF or these two are totally different technologies?

No and no.

OWL it is closely related to it to RDF:

  • OWL is a way of adding meaning / semantic richness to RDF. Among other things this allows automated reasoning / inferencing.

  • OWL is a way to define types for RDF data, though OWL "typing" differs from conventional type systems in that it has an open world assumption.

  • OWL is represented using RDF triples and typically expressed using RDF/XML syntax.

However, OWL is not an extension to RDF, in the same sense that DTDs and XML Schema are not extensions to XML. OWL does not allow you to say anything in RDF that you couldn't say already using RDF triples / syntax.

Stephen C
A: 

Firstly, an as has been pointed out before, owl can be serialised in RDF.

Secondly, OWL adds ontological capability to RDF (which on its own only provides extremely limited capability for formal knownledge representation), by providing the apparatus to define the components of your triple using formal computable first order description logic. That is what posters here mean by when they talk about "semantic richness".

Thirdly, it's important to realise that in OWL-Full (for OWL 1) rdfs:class and owl:class are equivalent and in OWL-DL, owl:class is a subclass of rdfs:class. In effect, this means that you can use an OWL ontology as a schema for RDF (which does not formally require schemata).

I hope that helps to clarify further.

Nico Adams
A: 

In the WC3 document object model, a document is an abstract thing: an element with text, comments, attributes, and other elements nested within it.

In the semantic web, we deal with a set of "triples". Each triple is a subject, the thing the triple is about, the id, the database primary key - a URI; the predicate, the "verb", the "property", the "database column" - another URI; and the object, an atomic value or some URI.

OWL is to the semantic web as Schemas are to the W3C document object model. It documents what the various URIs mean and specify how they are used in a formal way that can be checked by a machine. A semantic web may or may not be valid with respect to the OWL that applies to it, just as a document may or may not be valid with respect to a schema.

RDF is to the semantic web as XML is to the DOM - it's a serialisation of a set of triples.

Of course, RDF is usually serialised as an XML documents ... but it's important to understand that RDF is not the same thing as "the XML serialisation of RDF".

Likewise, OWL can be serialised using OWL/XML, or (sorry about this) it can be expressed as RDF, which itself is usually serialised as XML.

paulmurray