1 Last update 11 October 2011 Advanced databases
1 Last update: 11 October 2011 Advanced databases – The Semantic Web Bettina Berendt Katholieke Universiteit Leuven, Department of Computer Science http: //www. cs. kuleuven. be/~berendt/teaching/ Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 1
2 Agenda The Semantic Web: Motivation and overview Very brief recap of XML (& why it’s not semantic) RDF and RDFS OWL and ontologies Linked (Open) Data (LOD) Storing, accessing and combining SW data Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 2
3 The original vision The entertainment system was belting out the Beatles' "We Can Work It Out" when the phone rang. When Pete answered, his phone turned the sound down by sending a message to all the other local devices that had a volume control. His sister, Lucy, was on the line from the doctor's office: "Mom needs to see a specialist and then has to have a series of physical therapy sessions. Biweekly or something. I'm going to have my agent set up the appointments. " Pete immediately agreed to share the chauffeuring. At the doctor's office, Lucy instructed her Semantic Web agent through her handheld Web browser. The agent promptly retrieved information about Mom's prescribed treatment from the doctor's agent, looked up several lists of providers, and checked for the ones in-plan for Mom's insurance within a 20 -mile radius of her home and with a rating of excellent or very good on trusted rating services. It then began trying to find a match between available appointment times (supplied by the agents of individual providers through their Web sites) and Pete's and Lucy's busy schedules. (The emphasized keywords indicate terms whose semantics, or meaning, were defined for the agent through the Semantic Web. ) Tim Berners-Lee, James Hendler and Ora Lassila (2001). The Semantic Web. A new form of Web content that is meaningful to computers will unleash a revolution of new possibilities. Scientific American. http: //www. sciam. com/article. cfm? article. ID=00048144 -10 D 2 -1 C 7084 A 9809 EC 588 EF 21 Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 3
4 Questions 1. [concrete] What (meta-)data & procedures would be needed to solve this problem? 2. [general] What do you find works poorly on the Web today when you look for information? Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 4
5 The Semantic Web: overview n The semantic web is an evolving extension of the World Wide Web in which web content can be expressed not only in natural language, but also in a format that can be read and used by software agents, thus permitting them to find, share and integrate information more easily. n It derives from W 3 C director Sir Tim Berners-Lee's vision of the Web as a universal medium for data, information, and knowledge exchange. n At its core, the semantic web comprises a philosophy, a set of design principles, collaborative working groups, and a variety of enabling technologies. n Some elements of the semantic web are expressed as prospective future possibilities that have yet to be implemented or realized. n Other elements of the semantic web are expressed in formal specifications. n Some of these include Resource Description Framework (RDF), a variety of data interchange formats (e. g. RDF/XML, N 3, Turtle, N-Triples), and notations such as RDF Schema (RDFS) and the Web Ontology Language (OWL), all of which are intended to provide a formal description of concepts, terms, and relationships within a given knowledge domain. Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 5
6 The Semantic Web layer cake (T. Berners-Lee talk at XML 2000) OWL: W 3 C Rec. 2004 OWL 2: W 3 C Rec. 2009 RDF: W 3 C Rec. 2004 Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 6
7 BTW: Semantic non-interoperability has real consequences. . . Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 7
8 Working example: People and their relations Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 8
9 Approach 1: Centralised Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 9
10 Approach 2: Decentralised / open Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 10
11 FOAF (Friend of a Friend) n a machine-readable ontology describing persons, their activities and their relations to other people and objects. n Anyone can use FOAF to describe him or herself. n FOAF is an extension to RDF and is defined using OWL. n Computers may use these FOAF profiles to find, for example, all people living in Europe, or to list all people both you and a friend of you know. n This is accomplished by defining relationships between people. n Each profile has a unique identifier (such as the person's e-mail addresses, a Jabber ID, or a URI of the homepage or weblog of the person), which is used when defining these relationships. n The FOAF project, which defines and extends the vocabulary of a FOAF profile, was started in 2000 by Libby Miller and Dan Brickley. l n http: //www. foaf-project. org „possibly the single most prevalent use of Semantic Web technologies so far“ – blog software exporting FOAF + RSS (Paolillo et al. , 2005) Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 11
12 FOAF example (1) <rdf: RDF xmlns: rdf="http: //www. w 3. org/1999/02/22 -rdf-syntax-ns#" xmlns: foaf="http: //xmlns. com/foaf/0. 1/" xmlns: rdfs="http: //www. w 3. org/2000/01/rdf-schema#"> <foaf: Person rdf: about="#JW"> <foaf: name>Jimmy Wales</foaf: name> <foaf: mbox rdf: resource="mailto: jwales@bomis. com" /> <foaf: homepage rdf: resource="http: //www. jimmywales. com/" /> <foaf: nick>Jimbo</foaf: nick> <foaf: depiction rdf: resource="http: //www. jimmywales. com/aus_img_small. jpg" /> <foaf: interest> <rdf: Description rdf: about="http: //www. wikimedia. org" rdfs: label="Wikipedia" /> </foaf: interest> Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 12
13 FOAF example (2) <foaf: knows> Social-web inferences <foaf: Person> <foaf: name>Angela Beesley</foaf: name> <!-- Wikimedia Board of Trustees --> </foaf: Person> </foaf: knows> </foaf: Person> </rdf: RDF> Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 13
14 FOAF extensions (1) <rdf: RDF xmlns: rdf="http: //www. w 3. org/1999/02/22 -rdf-syntax-ns#" xmlns: foaf="http: //xmlns. com/foaf/0. 1/" xmlns: rel="http: //www. perceive. net/schemas/relationship/"> <foaf: Person rdf: ID="spiderman"> <foaf: name>Spiderman</foaf: name> <rel: enemy. Of rdf: resource="#green-goblin"/> </foaf: Person> <foaf: Person rdf: ID="green-goblin"> <foaf: name>Green Goblin</foaf: name> <rel: enemy. Of rdf: resource="#spiderman"/> </foaf: Person> Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 14
15 FOAF extensions (2) <foaf: Person rdf: ID="peter"> <foaf: name>Peter Parker</foaf: name> <rel: friend. Of rdf: resource="#harry"/> </foaf: Person> <foaf: Person rdf: ID="harry"> <foaf: name>Harry Osborn</foaf: name> <rel: friend. Of rdf: resource="#peter"/> <rel: child. Of rdf: resource="#norman"/> </foaf: Person> <foaf: Person rdf: ID="norman"> <foaf: name>Norman Osborn</foaf: name> <rel: parent. Of rdf: resource="#harry"/> </foaf: Person> </rdf: RDF> Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 15
16 FOAF multimedia (1) <rdf: RDF xmlns: rdf="http: //www. w 3. org/1999/02/22 -rdf-syntax-ns#" xmlns: foaf="http: //xmlns. com/foaf/0. 1/" xmlns: dc="http: //purl. org/dc/elements/1. 1/"> <foaf: Person rdf: ID="peter"> <foaf: name>Peter Parker</foaf: name> <foaf: depicts rdf: resource="http: //www. peterparker. com/peter. jpg"/> </foaf: Person> <foaf: Person rdf: ID="spiderman"> <foaf: name>Spiderman</foaf: name> </foaf: Person> Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 16
17 FOAF multimedia (2) <foaf: Person rdf: ID="green-goblin"> <foaf: name>Green Goblin</foaf: name> </foaf: Person> <!-- codepiction --> <foaf: Image rdf: about="http: //www. peterparker. com/photos/spiderman/statue. jpg"> <dc: title>Battle on the Statue Of Liberty</dc: title> <foaf: depicts rdf: resource="#spiderman"/> <foaf: depicts rdf: resource="#green-goblin"/> <foaf: maker rdf: resource="#peter"/> </foaf: Image> </rdf: RDF> Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 17
18 What inferences? Ex. : A social-network analysis of Live. Journal FOAF entries (Paolillo et al. , 2005) n Interests over time remain similar n Friends over time remain similar n But: the manner in which people elect friends and interests in their Live. Journal profiles is sharply different. . [These differences] represent fundamentally different social behaviors. n What does this mean for recommender systems? Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 18
19 Agenda The Semantic Web: Motivation and overview Very brief recap of XML (& why it’s not semantic) RDF and RDFS OWL and ontologies Linked (Open) Data (LOD) Storing, accessing and combining SW data Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 19
20 You have data … How should you structure it? Here's some data about an aircraft: medium-altitude, long-endurance unmanned aerial vehicle 14. 7 meters 512 kilograms 70 knots 400 nautical miles Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 20
The XML approach is to "wrap" each data item in start/end tags 21 and define this data schema, e. g. in a DTD <Aircraft> <wingspan>14. 8 meters</wingspan> <weight>512 kilograms</weight> <cruise-speed>70 knots</cruise-speed> <range>400 nautical miles</range> <description> medium-altitude, long-endurance unmanned aerial vehicle </description> </Aircraft> RQ-1. xml Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 21
22 XML Terminology <wingspan>14. 8 meters</wingspan> Start tag End tag Data Element Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 22
23 Why use XML? n It is a universally accepted standard way of structuring data (syntax). n It is a W 3 C recommendation (W 3 C = World Wide Web Consortium) n The marketplace supports it with a lot of free/inexpensive tools. n The alternative to using XML is to define your own proprietary data syntax, and then build your own proprietary tools to support the proprietary syntax (Not a very appealing idea). Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 23
24 But: What is this XML snippet talking about, i. e. , what are the semantics? What is a Predator? <Predator> … </Predator> Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 24
25 Predator - which one? n Predator: a medium-altitude, long-endurance unmanned aerial vehicle system. n Predator : one that victimizes, plunders, or destroys, especially for one's own gain. n Predator : an organism that lives by preying on other organisms. n Predator: a company which specializes in camouflage attire. n Predator: a video game. n Predator: software for machine networking. n Predator: a chain of paintball stores. Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 25
26 A little more flexibility through namespaces <? xml version="1. 0" encoding=„UTF-8"? > <my. Things xmlns: h=http: //www. my. Schemas. org/TR/aircraft/ xmlns: f="http: //www. your. Schemas. com/animals"> <h: Predator> <h: name>OL 231 -b</hname> <h: wingspan>14. 8 metres</h: wingspan> </h: Predator> <f: name>Panthera</f: name> <f: eats>antelopes</f: eats> </f: Predator> </my. Things> Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 26
27 . . . But this doesn‘t solve the fundamental problems 1. What does nesting mean? 2. What do syntactical variations mean? 3. What do linguistic variations mean? 4. How can we extend our knowledge? Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 27
28 1. What does nesting mean? Schema 1 allows for expressions like: <Person> <name>Peter Parker</name> . . . </Person> name being an XML-element of Person means: the person HAS-A. . . Schema 2 allows for expressions like: <Person> <type>Comic-book hero</type> . . . </Person> type being an XML-element of Person means: the person IS-A. . . Problems: a) we don‘t know what nesting means, b) even if we do know, we can‘t express this in a machine-readable way (at most build it into an application that uses these XML statements, but that would bury meaning in procedures!) Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 28
29 2. What do syntactical variations mean? Schema 1 allows for expressions like: <Person> <name>Peter Parker</name> <birthday>1932 -04 -12</birthday> . . . </Person> Schema 2 allows for expressions like: <Person name=“Peter Parker“> <type>Comic-book hero</type> . . . </Person> Problems: a) what does it mean for some information to be an XMLelement vs. an XML-attribute? b) even if we do know that they are the same, we can‘t express this in a machine-readable way, for example to combine the information from the two sources (same remark about applications as in 1. ) Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 29
30 3. What do linguistic variations mean? Schema 1 allows for expressions like: <Person> <name>Peter Parker</name>. . . </Person> Schema 2 allows for expressions like: <Person> <naam>Peter Parker</naam>. . . </Person> Problems: a) we do not know whether elements from different data sources that differ by, e. g. natural, language, are the same or not b) even if we do know that they are the same, we can‘t express this in a machine-readable way, for example to combine the information from the two sources (same remark about applications as in 1. ) Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 30
31 4. How can we extend our knowledge? Schema 1 allows for expressions like: <Web. Resource> <type>Picture</type> <has. URL>http: //www. example. org/Pictures/my. Pic. png</has. URL> <is. About>Peter Parker</is. About> . . . </Web. Resource> Schema 2 allows for expressions like: <Web. Resource> <has. URL>http: //www. example. org/Pictures/my. Pic. png</has. URL> <has. Licence>Creative. Commons</has. Licence> . . . </Web. Resource> Problems: a) we cannot refine our schema information by that provided by another source b) even if we can be sure about principal linkability (here: via the URL), we can‘t express this in a machine-readable way, for example to combine the information from the two sources (same remark about applications as in 1. ) Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 31
Summary: XML not well-suited for conceptual modelling and therefore not suited for truly semantic markup 32 XML makes no commitment on: Domain-specific ontological vocabulary Ontological modeling primitives Requires pre-arranged agreement on & Only feasible for closed collaboration n agents in a small & stable community n pages on a small & stable intranet Not suited for sharing Web-resources Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 32
33 Solution approach of the „higher levels“ of the Semantic Web 1. Break down information into atomic statements: subject-predicate-object 2. Define (in a formal-semantics way) what each component of each statement means 3. a. Give it a URI (uniform resource identifier) to enable uniform meaning specification b. Define languages to say more about (specify) the meaning (by relating it to other units of meaning – cf. a dictionary in which each word is explained by other words) c. (exception: some components may be literals / strings – these are not defined further) The languages mentioned in 2. b. each add more expressivity: 1. RDF: subject-predicate-object statements (in RDF terminology: a resource has a property with a certain value. 2. RDFS: simple ontology building blocks: class, subclass-of relation, use RDF‘s type to denote that (e. g. ) an individual is a instance of a class (= make it possible to define a schema and its instances), . . . 3. OWL: more advanced ontology building blocks: a class (= concept) is disjoint with another one, is the same as another one; a property is functional, symmetric, the inverse of another one; . . . Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 33
34 Semantic Web vs. Database Advantages of using RDF/RDFS/OWL to define an Ontology: n Extensible: much easier to add new properties. Contrast with a database - adding a new column may break a lot of applications n Portable: much easier to move an OWL document than to move a database. Advantages of using a Database to define an Ontology: n Mature: the database technology has been around a long time and is very mature. Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 34
35 Agenda The Semantic Web: Motivation and overview Very brief recap of XML (& why it’s not semantic) RDF and RDFS OWL and ontologies Linked (Open) Data (LOD) Storing, accessing and combining SW data Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 35
36 What is RDF ? RDF is a data model l the model is domain-neutral, application-neutral l the model can be viewed as directed, labeled graphs or as an object-oriented model (object/attribute/value) RDF data model is an abstract, conceptual layer independent of XML l consequently, XML is a transfer syntax for RDF, not a component of RDF l RDF data might never occur in XML form Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 36
37 RDF model RDF “statements” consist of resources (= nodes) which have properties which have values (= nodes, strings) resource property = subject = predicate = object value “http: //www. w 3. org/TR/REC-rdf-syntax/ has the author Ora Lassila” http: //www. w 3. org/TR/REC-rdf-syntax/ author “Ora Lassila” Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 37
38 RDF Model Example “W 3 C” dc: Publisher http: //www. w 3. org/TR/REC-rdf-syntax/ dc: Creator dc: Date “Ora Lassila” “ 1999 -02 -22” Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 38
39 Complex values So far, values of properties have been strings A graph node (corresponding to a resource) also can be the value of a property n arbitrarily complex tree and graph structures are possible n syntactically, values can be embedded (i. e. lexically in-line) or referenced (linked) Example: http: //www. w 3. org/TR/REC-rdf-syntax/ dc: Creator p: Name “Ora Lassila” p: EMail “ora. lassila@nokia. com” Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 39
40 Complex values (continued) Corresponding triples { “http: //www. w 3. org/TR/PR-rdf-syntax/”, dc: Creator, x } { x, p: Name, “Ora Lassila” } { x, p: EMail, “ora. lassila@nokia. com” } http: //www. w 3. org/TR/REC-rdf-syntax/ dc: Creator p: Name “Ora Lassila” p: EMail “ora. lassila@nokia. com” Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 40
41 Containers are collections n they allow grouping of resources (or literal values) It is possible to make statements about the container (as a whole) or about its members individually Different types of containers exist n bag - unordered collection n seq - ordered collection (= “sequence”) n alt - represents alternatives It is also possible to create collections based on URI patterns n for example, all files in a particular web site Duplicate values are permitted n there is no mechanism to enforce unique value constraints Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 41
42 Containers (continued) http: //www. w 3. org/TR/REC-rdf-syntax dc: Creator rdf: Type rdf: _1 “Ora Lassila” rdf: Seq rdf: _2 “Ralph Swick” Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 42
43 Higher-order statements One can make RDF statements about other RDF statements n example: “Ralph believes that the web contains one billion documents” Higher-order statements n allow us to express beliefs (and other modalities) n are important for trust models, digital signatures, etc. n also: metadata about metadata n are represented by modeling RDF in RDF itself Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 43
44 Reification n RDF is not really second-order n But it does provide a built-in predicate vocabulary for reification http: //www. w 3. org/TR/REC-rdf-syntax dc: Creator “Ora Lassila” dc: Creator “Library of Congress” • The dotted box corresponds to the following statements • • { x, rdf: predicate, “dc: creator” } { x, rdf: subject, “http: //www. w 3. org/TR/RED-rdf-syntax } { x, rdf: object, “Ora Lassila” } { x, rdf: type, “rdf: statement” } Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 44
45 Reification n. Any statement can be an object graphs can be nested - reification NYT claims pers 05 Author-of ISBN. . . <rdf: Description rdf: about=“#NYT”> <claims> <rdf: Description rdf: about=“#pers 05”> <author. Of>ISBN. . . </author. Of> </rdf: Description> </claims> </rdf: Description> Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 45
46 RDF Schema • Defines small vocabulary for RDF: • Class, sub. Class. Of, type • Property, sub. Property. Of • domain, range • Vocabulary can be used to define other vocabularies for your application Person domain sub. Class. Of Student domain has. Super. Visor type Frank has. Super. Visor range Researcher type Jeen Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 46
47 RDF Schema syntax in XML <rdf: Description ID="Motor. Vehicle"> <rdf: type resource="http: //www. w 3. org/. . . #Class"/> <rdfs: sub. Class. Of rdf: resource="http: //www. w 3. org/. . . #Resource"/> </rdf: Description> <rdf: Description ID="Truck"> <rdf: type resource="http: //www. w 3. org/. . . #Class"/> <rdfs: sub. Class. Of rdf: resource="#Motor. Vehicle"/> </rdf: Description> <rdf: Description ID="registered. To"> <rdf: type resource="http: //www. w 3. org/. . . #Property"/> <rdfs: domain rdf: resource="#Motor. Vehicle"/> <rdfs: range rdf: resource="#Person"/> </rdf: Description> <rdf: Description ID=”owned. By"> <rdf: type resource="http: //www. w 3. org/. . . #Property"/> <rdfs: sub. Property. Of rdf: resource="#registered. To"/> </rdf: Description> Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 47
48 Agenda The Semantic Web: Motivation and overview Very brief recap of XML (& why it’s not semantic) RDF and RDFS OWL and ontologies Linked (Open) Data (LOD) Storing, accessing and combining SW data Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 48
49 Ontologies and concepts n An ontology is a conceptual model. n An Ontology is the collection of semantic definitions for a domain. n Example: an Aircraft Ontology is the set of semantic definitions for the Aircraft domain, e. g. , n l Predator is a sub. Class. Of Aircraft. l sensor. ID is a Functional. Property. l Platform is an equivalent. Class to Aircraft. Predator, Aircraft etc. are concepts. Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 49
Basic idea of conceptual modelling (not only in SW): The semiotic triangle Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 50 50
What is an ontology? 51 (A commonly accepted informal definition and one formal definition) An ontology is „an explicit specification of a shared conceptualisation. “ (Gruber, 1993) (Stumme, Hotho & Berendt, Semantic Web Journal 2006)) Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 51
52 In which semantic web languages can ontologies be formulated? n RDF Schema is sufficient to specify an ontology with the first 4 components n For the fifth component (logical axioms), need a more expressive language like OWL. Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 52
53 Ontologies, decentralization, and bottom-up engineering Communities of users (application builders, . . . ) can n Re-use existing ontologies l Established domain-specific ontologies (e. g. , real-estate, medicine, bioinformatics) l „The big one“: Cyc, see www. cyc. com l Search for ontologies – See overview at http: //en. wikipedia. org/wiki/Ontology_%28 information_science%29 #Ontology_libraries – Use Sindice with some tricks: http: //groups. google. com/group/sindicedev/browse_thread/831 c 084 c 3 b 5 a 0214 (or try the Advanced Search directly: http: //sindice. com/search ) n Link to existing ontologies n Extend existing ontologies Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 53
Ontologies as conceptual models / schemas; or: Database (knowledge base) = Ontology + Instances 54 <owl: Class rdf: ID="Book. Catalogue"/> <owl: Datatype. Property rdf: ID="title"> <rdfs: domain rdf: resource="#Book. Catalogue"/> <rdfs: range rdf: resource="&xsd; #string"/> </owl: Datatype. Property> <owl: Datatype. Property rdf: ID="author"> <rdfs: domain rdf: resource="#Book. Catalogue"/> <rdfs: range rdf: resource="&xsd; #string"/> </owl: Datatype. Property> title author date My Life and Times Paul Mc. Cartney June, 1998 Illusions Richard Bach 1972 First and Last Freedom J. Krishnamurti 1974 <owl: Datatype. Property rdf: ID="date"> <rdfs: domain rdf: resource="#Book. Catalogue"/> <rdfs: range rdf: resource="&xsd; #date"/> </owl: Datatype. Property> Book. Catalogue <? xml version=“ 1. 0”? > <Book. Catalogue> <title>My Life and Times</title> <author>Paul Mc. Cartney</author> <date>June, 1998</date> </Book. Catalogue> Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 54
55 OWL: more details n You‘ve already worked with it n Here is a nice tutorial that takes you through OWL‘s possibilities formulating restrictions, constructing classes, etc. , starting from the Protégé interface: http: //protege. stanford. edu/plugins/owl/publications/2004 -0706 -OWL-Tutorial. ppt n And here is a version of the Tourism ontology created there in OWL (XML notation): http: //gaia. fdi. ucm. es/ontologies/travel. owl Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 55
56 Agenda The Semantic Web: Motivation and overview Very brief recap of XML (& why it’s not semantic) RDF and RDFS OWL and ontologies Linked (Open) Data (LOD) Storing, accessing and combining SW data Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 56
57 What is LOD? n “A way of making the Semantic Web happen“ (it is hoped) n Key concept: leverage the existence of structured data and combine it with the languages and infrastructures of the Web and the Semantic Web n Tim Berners-Lee: four principles of Linked Data (http: //www. w 3. org/Design. Issues/Linked. Data) l Use URIs to identify things. l Use HTTP URIs so that these things can be referred to and looked up ("dereferenced") by people and user agents. l Provide useful information about the thing when its URI is dereferenced, using standard formats such as RDF/XML. l Include links to other, related URIs in the exposed data to improve discovery of other related information on the Web. Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 57
58 Data items are identified with HTTP URIs pd: cygri rdf: type foaf: name foaf: Person Richard Cyganiak foaf: based_near dbpedia: Berlin pd: cygri = http: //richard. cyganiak. de/foaf. rdf#cygri dbpedia: Berlin = http: //dbpedia. org/resource/Berlin From http: //www. ai. sri. com/~nysmith/slides/aic-seminars/090724 -bizer. ppt Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 58
59 Resolving URIs over the Web pd: cygri rdf: type foaf: name foaf: Person Richard Cyganiak foaf: based_near dp: population 3. 405. 259 dbpedia: Berlin skos: subject dp: Cities_in_Germany From http: //www. ai. sri. com/~nysmith/slides/aic-seminars/090724 -bizer. ppt Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 59
60 Dereferencing URIs over the Web pd: cygri rdf: type foaf: name foaf: Person Richard Cyganiak foaf: based_near dp: population 3. 405. 259 dbpedia: Berlin skos: subject dbpedia: Hamburg dbpedia: Muenchen skos: subject dp: Cities_in_Germany skos: subject From http: //www. ai. sri. com/~nysmith/slides/aic-seminars/090724 -bizer. ppt Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 60
61 The Linked Open Data Cloud Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 61
Interactive visualization of the Linked Data Cloud 62 http: //www. webknox. com/blog/2010/05/linked-open-data-on-the-web-visualization/ Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 62
63 More on LOD n W 3 C Linking Open Data community project: http: //www. w 3. org/wiki/Sweo. IG/Task. Forces/Community. Proje cts/Linking. Open. Data n A nice slideset is available at http: //www. ai. sri. com/~nysmith/slides/aic-seminars/090724 bizer. ppt n and a tutorial (together with a link to a recent book) at http: //www 4. wiwiss. fuberlin. de/bizer/pub/Linked. Data. Tutorial/ Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 63
64 Agenda The Semantic Web: Motivation and overview Very brief recap of XML (& why it’s not semantic) RDF and RDFS OWL and ontologies Linked (Open) Data (LOD) Storing, accessing and combining SW data Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 64
65 How is this data stored? (1) In „Semantic Web / LOD databases“: triplestores n A triplestore is a purpose-built database for the storage and retrieval of Resource Description Framework (RDF) metadata. n A triplestore can store many (up to billions) of RDF triples n For a list of implementations, see http: //en. wikipedia. org/wiki/Triplestore Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 65
66 How is this data stored? (2) Embedded in Web pages n n RDFa l a W 3 C Recommendation: http: //www. w 3. org/TR/rdfa-syntax/ l e. g. for people: embed FOAF Microformats l n Microdata l n e. g. for people: hcard + XHTML Friends Network e. g. http: //schema. org What are the differences? Which one(s) are “truly Semantic Web“? l Just one out of many sample blogs comparing the three: http: //blog. foolip. org/2009/08/23/microformats-vs-rdfa-vs-microdata/ Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 66
67 How is this data accessed? n By search engines that can extract the markup from Web pages l n By search engines that directly access triplestores l n e. g. , Google e. g. Sindice By your own applications that directly access triplestores l e. g. your homework 2 Obviously, data can then also be transformed into RDF (e. g. RDFa) or into human-readable web pages, see the following for an example Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 67
68 LOD on people (1) Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 68
69 LOD on people (2) Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 69
70 What do the LOD on people actually say? (1) Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 70
71 What do the LOD on people actually say? (2) Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 71
What does the combination/integration of this information require? 72 n “Linkability“ at the technical level: see Linked Data principles n “Linkability“ at the semantic level of identity: same. As n “Linkability“ at the semantic level of more complex relationships: schema / ontology matching l e. g. your homework 2 Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 72
73 PS: What are „semantic technologies“? n encode meanings separately from data and content files, and separately from application code n Often uses elements (e. g. the OWL language) of the Semantic Web n But not necessarily open data n Thus, increasingly popular for example for within-company solutions Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 73
74 Outlook The Semantic Web: Motivation and overview Very brief recap of XML (& why it’s not semantic) RDF and RDFS OWL and ontologies Linked (Open) Data (LOD) Storing, accessing and combining SW data Schema/ontology matching Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 74
75 Used sources (From or based on): p. 6: http: //en. wikipedia. org/wiki/Semantic_Web pp. 21 -26, 49: Costello, R. L. & Jacobs, D. B. (2003). A Two Minute Intro to XML. www. daml. org/meetings/2003/05/SWMU/briefings/07_1045_Essential_Building_Blocks. ppt p. 33, pp. 37 -48: Unnamed (no date). RDF and XML tutorial. http: //lsdis. cs. uga. edu/Sem. Web. Course/RDF. ppt p. 35, 53: Costello, R. L. & Jacobs, D. B. (2003). OWL Web Ontology Language. http: //www. racai. ro/EUROLAN-2003/html/presentations/James. Hendler/owl/OWL. ppt pp. 12 -14: http: //en. wikipedia. org/wiki/FOAF_(software) pp. 15 -18: Dodds, L. (2004). An Introduction to FOAF. http: //www. xml. com/pub/a/2004/02/04/foaf. html Picture credits: see PPT „comments“ field Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 75
76 Further references, background reading; acknowledgements J. C. Paolillo, S. Mercure, and E. Wright. (2005). The social semantics of Livejournal FOAF: Structure and change from 2004 to 2005. In G. Stumme, B. Hoser, C. Schmitz, and H. Alani, editors, Proceedings of the 1 st Workshop on Semantic Network Analysis at the ISWC 2005 Conference, pages 69 – 80. http: //www. blogninja. com/paolillo-mercure-wright. final. pdf Specifications: RDF: http: //www. w 3. org/RDF/ , http: //www. w 3. org/TR/rdf-primer OWL: http: //www. w 3. org/TR/owl-features OWL 2: http: //www. w 3. org/TR/owl 2 -overview/ FOAF: http: //xmlns. com/foaf/spec Berendt: Advanced databases, 1 st semester 2011/2012, http: //www. cs. kuleuven. be/~berendt/teaching/ 76
- Slides: 76