02: Describing Web Sources in RDF Flashcards
RDF
- Resource Description Framework
- framework for describing resources on the web
- designed to be read and understood by computers
- not designed for being displayed to people
Drawbacks of XML
- does not talk about semantics (meaning) of data
Basic Building Block of RDF
-
object-attribute-value triplet
- also called a statement
Fundamental Concepts of RDF
- resources
- properties
- statements
Resources
Like an object, a “thing” we want to talk about
e.g. authors, books, publishers, places, people, hotels
URI
Universal Resource Identifier
i.e. a URL (Uniform Resource Locator), web address, or some other kind of unique identifier
Advantages of Using URIs
- Provides a global, worldwide, unique naming scheme
- Reduce the homonym problem of distributed data representation
Properties
-
describe relations between resources
e. g. “written-by”, “age”, “title”, etc. - also identified by URIs
Statements
- assert the properties of resources
-
object-attribute-value triple or subject-predicate-object
- consists of a resource, a property, and a value
- values can be resources or literals
The Three Views of a Statement in RDF
- A triple
- A piece of a graph (e.g. a semantic net)
- A piece of XML code (e.g. an XML document)
Draw the following triplet as a semantic net:
David Billington owns the website www.cit.gu.edu.au/~db.
- from the resource (the subject of the statement)
- to the value (the object of the statement)

Write the following statement as XML in an RDF document:
David Billington owns the website www.cit.gu.edu.au/~db.
- rdf:about sets the object URI of a statement
- rdf:resource sets the value URI of a statement
- rdf:Description makes a statement about the resource, where the property is used as a tag and the content is the value of the property
- # in “#David Billington” indicates an ID defined in the same document
- rdf:RDF is a tag that represents an RDF document

Write the following as a triplet:
X is the referee in a chess game between players Y and Z.
referee(X, Y, Z)
- Introduce new auxiliary resource: chessGame
- Identify binary predicates: ref, player1, player2
“X referees a chess game.”
“Player X plays in the game.”
“Player Z plays in the game.”

Reification
“statements can be made about other statements”
- rdf:subject, rdf:predicate, and rdf:object allow us to access the parts of a statement
- The ID of the statement can be used to refer to it, as can be done for any description
- Write rdf:Description if we don’t want to talk about a statement further
- Write rdf:Statement if we wish to refer to a statement
Perform reification on the following statement and give it the ID of StatementAbout949352


What is the difference between rdf:about and rdf:ID?
rdf:about - indicates that the resource has already been “defined” elsewhere
rdf:ID - indicates that the resource is defined now
Simplification Rules of RDF
- Childless property elements within description elements may be replaced by XML attributes
- For description elements with a typing element we can use the name specified in the rdf:type element instead of rdf:Description
Abbreviate the following RDF using the simplification rules:


Container Elements
- number of resources or attributes about which we want to make statements as a whole
e. g. we may wish to talk about the courses given by a particular lecturer - content of container elements are named rdf:_1, rdf:_2, etc.
Three Types of Container Elements:
1. rdf:Bag
Unordered container, allowing multiple occurrences
e.g. members of the faculty board, documents in a folder
<lecturer></lecturer>
<coursestaught></coursestaught>
<bag></bag>
<_1 rdf:resource=”#CIT1112”>
<_2 rdf:resource=”#CIT3116”>
Three Types of Container Elements:
2. rdf:Seq
Ordered container, which may contain multiple occurrences
e.g. modules of a course, items on an agenda, an alphabetized list of staff members
- *
Three Types of Container Elements:
3. rdf:Alt
A set of alternatives
e.g. translations of a document in various languages