Sunday, March 2, 2008

The Semantic Web in a nutshell - RDF - heart of the Semantic Web

The heart and soul of the Semantic Web is RDF, short for Resource Description Framework, which is a language for describing entities, known as resources, in terms of their identity, their attributes or properties, and the relationships between these resources and classes of resources.

At its core, the Semantic Web, and hence RDF, is all about resources, which can be absolutely anything in the universe, either real or imagined. Typically a resource is either a class of resources or an instance of a class of resources.

Webs or networks of resources can be constructured and are known as RDF graphs. Many RDF graphs will be interconnected in larger webs or networks or graphs, but some may exist as smaller, isolated graphs.

Each resource is named with an identifier, which is a URI (Uniform Resource Identifier, which is very similar to a URL or Uniform Resource Locator), known as an RDF URI. An RDF graph refers to resources using RDF URI references.

The properties or attributes of resources and classes of resources are represented using a collection of statements about the resources, known as RDF statements. Relationships between resources and classes of resources are also represented using RDF statements.

Each RDF statement is represented in a form known as an RDF triple or simply triple. An RDF triple has three components: an RDF subject, an RDF predicate, and an RDF object, all three of which are RDF URI references. Typically, the subject is the identifier for a resource, the predicate is the name of a property, and the object is either a reference to another resource or a property value.

RDF statements are collected together to form a RDF document. Typically an RDF document will be stored on the Web and the URL for that document, known as an absolute URI, will be used as the base for the RDF URIs of all resources in that file.

Since even simple resources may require many statements and there may be many resources, software may access and pre-process a large number of RDF documents and store the pre-processed triples in a database known as a triple store. That is not a requirement for the Semantic Web, but it can dramatically improve performance.

Each resource will typically have a label in an RDF document. A reference to a label is known as a fragment identifier. Typically an RDF URI reference consists of the absolute URI for the RDF document followed by the fragment identifier for the specific resource.

Conceptually, RDF is independent of the lower level XML language, but in practice an RDF graph is serialized into XML.

Because URIs can be quite long and cumbersome, RDF statements typically utilize XML namespaces, which allow a short name to be used as a synonym for the full URI associated with the namespace within the scope of a resource in an RDF document file. XML supports a qualified name or QName, which permits the full RDF URI reference to be represented by a QName consisting of an XML namespace name and the name within the namespace. It is also possible to declare a default namespace so that even the XML namespace need not be specified on every URI reference.

People casually refer to the Semantic Web and resource properties as metadata, but that term is not a formal aspect of the Semantic Web.

There is a lot more to the Semantic Web than what I have said here and I may have oversimplified or misrepresented some aspects of the Semantic Web, but this should give you a good start at understanding what the Semantic Web is about.

In summary:

  • XML is the lower-level language in which RDF resources and graphs are represented as text documents
  • An RDF document contains the XML serialization of RDF statements about one or more resources
  • Every resource has a name represented as a URI
  • XML namespaces simplify references to resources
  • RDF statements (triples) specify the attributes and classes of resources
  • RDF statements specify the relationships between resources and classes of resources

-- Jack Krupansky

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home