What is the Web?
Properties of the Web
|
|
What is the Semantic Web
Properties of the Semantic Web
|
|
|
|
|
Relational database |
Triple |
<http://example.org/mit#pat> <http://xmlns.com/foaf/0.1/knows> <http://example.org/cmu#jo>.
<rdf:Description rdf:about="http://example.org/mit#pat">
<foaf:knows rdf:resource="http://example.org/cmu#jo"/>
</rdf:Description>
mit:pat foaf:knows cmu:jo
<rdf:Description rdf:about="mit#pat">
<foaf:knows rdf:resource="cmu#jo"/>
</rdf:Description>
Similar to Object Oriented Programming
public class Course {
public Person instructor;
public string location;
public Person student;
// constructor
public Course(Person i, string l) {
instructor = i;
location = l;
}
public void AddStudent(Person s) {
...}
public List GetStudents() {
...}
}
In RDF you can use rdf and rdfs namespaces to define concepts and their properties
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . Course rdf:type rdfs:Class. instructor rdf:type rdf:Property. instructor rdfs:domain Course. instructor rdfs:range Person. student rdf:type rdf:Property. student rdfs:domain Course. student rdfs:range Person. location rdf:type rdf:Property. location rdfs:domain Course.
More shortcuts, rdf:type = a, property-values of same concept can be separated by ';'
6.898 a Course; instructor <http://csail.mit.edu/~lkagal/foaf#me>; instructor <http://swiss.csail.mit.edu/users/cph/foaf#cph>; student <http://mit.edu/~yosi/foaf#yes>; location <http://mit.edu/36-153>.
<> a foaf:PersonalProfileDocument;
foaf:maker :me.
:me a foaf:Person;
foaf:family_name "Kagal";
foaf:givenname "Lalana";
foaf:homepage <http://csail.mit.edu/~lkagal/>;
foaf:knows <http://perich.net/foaf.rdf#FP>,
<http://swiss.csail.mit.edu/users/cph/foaf.rdf#cph>,
<http://www.w3.org/People/Berners-Lee/card#i>;
foaf:name "Lalana Kagal";
foaf:schoolHomepage <http://www.cs.umbc.edu/>;
foaf:workplaceHomepage <http://www.csail.mit.edu/index.php> .
