Publishing linked data from relational databases

1,011 views

Published on

Jornadas de Software Libre y Web 2.0
Universidad de Cádiz
10 de Noviembre de 2011
http://softwarelibre.uca.es/node/1201

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,011
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
23
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Publishing linked data from relational databases

  1. 1. Publishing Linked Datafrom relational databases Iván Ruiz Rube Departamento de Lenguajes y Sistemas Informáticos Universidad de Cádiz 09/11/2011 Jornadas de Software Libre y Web 2.0 1
  2. 2. Roadmap The evolution of the Web Linked Open Data Exposing databases with D2R Server Case study: The VOA3R Project Conclusions 09/11/2011 Jornadas de Software Libre y Web 2.0 2
  3. 3. PUBLISHING LINKED DATA FROM RELATIONALDATABASESTHE EVOLUTION OFTHE WEB 09/11/2011 Jornadas de Software Libre y Web 2.0 3
  4. 4. World Wide Web Most important infrastructure for the distribution of information. Rich and broad information: text, images, videos, slides, etc. Web navigators support HTML, JS, CSS and other formats. Navigation based on hyperlinks. 09/11/2011 Jornadas de Software Libre y Web 2.0 4
  5. 5. Web based on documents 09/11/2011 Jornadas de Software Libre y Web 2.0 5
  6. 6. Web Evolution Web 1.0 Web 2.0 Web 3.0 09/11/2011 Jornadas de Software Libre y Web 2.0 6
  7. 7. Web 1.0  Beginnings of the Web  Static pages  Limited use of standards  Lack of interaction with the user 09/11/2011 Jornadas de Software Libre y Web 2.0 7
  8. 8. Web 2.0  Higher bandwidth  Standards  Rich User Interface  Accessibility  Usability  Social networks 09/11/2011 Jornadas de Software Libre y Web 2.0 8
  9. 9. Web 3.0  3D virtual environments  The Internet of Things  Domotics  Cloud Computing  Semantic Web 09/11/2011 Jornadas de Software Libre y Web 2.0 9
  10. 10. Semantic Web 1Tim Berners-Lee“I have a dream for the Web (in which computers) become capable of analyzing all the data on the Web….”“…the day-to-day mechanisms of trade, bureaucracy and our daily lives will be handled by machines talking to machines.” 09/11/2011 Jornadas de Software Libre y Web 2.0 10
  11. 11. PUBLISHING LINKED DATA FROM RELATIONALDATABASESLINKED OPEN DATA 09/11/2011 Jornadas de Software Libre y Web 2.0 11
  12. 12. Information Age  Huge amount of information  A large number of information systems  Big challenges: ◦ Data integration ◦ Data analysis 09/11/2011 Jornadas de Software Libre y Web 2.0 12
  13. 13. Need for open data  Improvement of organizational transparency  Public data  Foster the research  Promote the development of third-party system 09/11/2011 Jornadas de Software Libre y Web 2.0 13
  14. 14. Linked Open Data“A method of publishing structured data so that it can be interlinked and become more useful.…it extends web pages to share information in a way that can be read automatically by computers.”1 1Tim Berners-Lee 09/11/2011 Jornadas de Software Libre y Web 2.0 14
  15. 15. Resource Description Formathttp://publisher.org/Papers/ Paper12345 09/11/2011 Jornadas de Software Libre y Web 2.0 15
  16. 16. Resource Description Format Linked Data - The Story So Far titlehttp://publisher.org/Papers/ Paper12345 year 2008 09/11/2011 Jornadas de Software Libre y Web 2.0 16
  17. 17. Resource Description Format Linked Data - The Story So Far http://publisher.org/Journals/ JournalSWIS title publishedInhttp://publisher.org/Papers/ Paper12345 author http://w3.org/People/ Berners-Lee year 2008 09/11/2011 Jornadas de Software Libre y Web 2.0 17
  18. 18. Resource Description Format Linked Data - The Story So Far http://publisher.org/Journals/ JournalSWIS title publishedIn http://w3c.orghttp://publisher.org/Papers/ director Paper12345 author http://w3.org/People/ Berners-Lee year type 2008 http://xmlns.com/foaf/ Person 09/11/2011 Jornadas de Software Libre y Web 2.0 18
  19. 19. RDF (sintaxis)<http://publisher.org/Papers/Paper12345> title "Linked Data - The Story So Far"; year "2008-01-01"; author <http://w3.org/People/Berners-Lee>; publishedIn <http://publisher.org/Journal/JournalSWIS> .<rdf:Description rdf:about="http://publisher.org/Papers/Paper12345"> <title>Linked Data - The Story So Far</title> <year>2008-01-01</year> <author rdf:resource="http://w3.org/People/Berners-Lee" /> <publishedIn rdf:resource="http://publisher.org/Journal/JournalSWIS" /></rdf:Description> 09/11/2011 Jornadas de Software Libre y Web 2.0 19
  20. 20. Ontologies (vocabularies)“An ontology is an explicit and formal specification of a shared conceptualization1“1Tom Gruber 09/11/2011 Jornadas de Software Libre y Web 2.0 20
  21. 21. Linked Data Cloud 09/11/2011 Jornadas de Software Libre y Web 2.0 21
  22. 22. PUBLISHING LINKED DATA FROM RELATIONALDATABASESEXPOSING DATABASESWITH D2R SERVER 09/11/2011 Jornadas de Software Libre y Web 2.0 22
  23. 23. How is your data currently stored? 09/11/2011 Jornadas de Software Libre y Web 2.0 23
  24. 24. How to publish Linked Data? The Story So Far JournalSemanticWeb  Annotation ◦ Manual ◦ Collaborative LinkedData Berners-Lee 2008 W3C ◦ (Semi-)automatic  Exposure ◦ RDF Triple Store ◦ HTML+RDF (RDFa) ◦ RDF Wrappers ◦ SQL2RDF 09/11/2011 Jornadas de Software Libre y Web 2.0 24
  25. 25. Web Application Architecture User Interface Relational Application Server Database 09/11/2011 Jornadas de Software Libre y Web 2.0 25
  26. 26. Web Application Architecture usingD2R Server Application Server Relational Database 09/11/2011 Jornadas de Software Libre y Web 2.0 26
  27. 27. Web Application Architecture usingD2R Server Application Server <http://cris.org:/resource/projects/Organic> a cerif:Project ; rdfs:label "Multilingual Federation of Learning Repositories"@en-uk ; Relational cerif:acronym "Organic.Edunet" ; cerif:endDate "2010-09-30"^^xsd:date ; cerif:internalIdentifier Database "ff808181300cf99e01300d1a355f0003" cerif:isLinkedByOrganisationUnit D2R Server 09/11/2011 Jornadas de Software Libre y Web 2.0 27
  28. 28. Web Application Architecture usingD2R Server Application Server <http://cris.org:/resource/projects/Organic> a cerif:Project ; rdfs:label "Multilingual Federation of Learning Repositories"@en-uk ; Relational cerif:acronym "Organic.Edunet" ; cerif:endDate "2010-09-30"^^xsd:date ; cerif:internalIdentifier Database "ff808181300cf99e01300d1a355f0003" cerif:isLinkedByOrganisationUnit D2R Server 09/11/2011 Jornadas de Software Libre y Web 2.0 28
  29. 29. Exposing and Consuming Linked Data Internet Navigator File Favourites Help URL: http://mashup.orgRelational D2RDatabase Server mashup 09/11/2011 Jornadas de Software Libre y Web 2.0 29
  30. 30. Installing D2R 09/11/2011 Jornadas de Software Libre y Web 2.0 30
  31. 31. Using D2R~/d2rserver$> generate-mapping -o MAPPING.n3 -d com.mysql.jdbc.Driver -u USER -p PASSWORD jdbc:mysql://localhost:3306/DATABASE~/d2rserver$> d2r-server MAPPING.n3 09/11/2011 Jornadas de Software Libre y Web 2.0 31
  32. 32. Database model example 09/11/2011 Jornadas de Software Libre y Web 2.0 32
  33. 33. Vocabularies#Built-in vocabularies@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .@prefix owl: <http://www.w3.org/2002/07/owl#> .#Specific vocabularies@prefix foaf: <http://xmlns.com/foaf/0.1/> .@prefix dc: <http://purl.org/dc/elements/1.1/> .@prefix dcterms: <http://purl.org/dc/terms/> .@prefix bibo: <http://purl.org/ontology/bibo/> .@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .@prefix cerif: <http://eurocris.org/cerif#> . 09/11/2011 Jornadas de Software Libre y Web 2.0 33
  34. 34. Database Connectionmap:database a d2rq:Database;# Main settings d2rq:jdbcDriver "com.mysql.jdbc.Driver"; d2rq:jdbcDSN "jdbc:mysql://localhost:3306/DATABASE"; d2rq:username "USER"; d2rq:password "PASSWORD";# Other settings jdbc:autoReconnect "true"; jdbc:zeroDateTimeBehavior "convertToNull"; d2rq:allowDistinct "true"; jdbc:keepAlive "3600"; # value in seconds jdbc:keepAliveQuery "SELECT 1"; . 09/11/2011 Jornadas de Software Libre y Web 2.0 34
  35. 35. Exposing RDF Resourcesmap:OrganisationUnits a d2rq:ClassMap; d2rq:dataStorage map:database; d2rq:class cerif:Organization; d2rq:uriPattern "organizations/@@ORGANISATIONS.ACRONYM@@"; d2rq:condition "ORGANISATIONS.ACRONYM <> “ . http://dataset.org/organizations/ UCA rdf:type http://eurocris.org/cerif/ Organization 09/11/2011 Jornadas de Software Libre y Web 2.0 35
  36. 36. Exposing literal propertiesmap:OrganisationUnits_Headcount a d2rq:PropertyBridge; d2rq:belongsToClassMap map:OrganisationUnits; d2rq:property cerif:headcount; d2rq:column "ORGANISATIONS.HEADCOUNT “ . http://dataset.org/organizations/ UCA cerif:headcount 2400 09/11/2011 Jornadas de Software Libre y Web 2.0 36
  37. 37. Exposing 1:N relationsmap:OrganisationUnits_Name a d2rq:PropertyBridge; d2rq:belongsToClassMap map:OrganisationUnits; d2rq:property cerif:name; d2rq:join "ORG_NAME.ORGID = ORGANISATIONS.ID"; d2rq:column "ORG_NAME.NAME“ . http://dataset.org/organizations/ UCA cerif:name cerif:name Universidad de Cádiz@es University of Cádiz@en 09/11/2011 Jornadas de Software Libre y Web 2.0 37
  38. 38. Exposing N:M relationsmap:OrganisationUnits_Person a d2rq:PropertyBridge; d2rq:belongsToClassMap map:OrganisationUnits; d2rq:property cerif:members; d2rq:join "ORG_PERS.ORGID = ORGANISATIONS.ID"; d2rq:join "ORG_PERS.PERSID = PERSON.ID"; d2rq:refersToClassMap map:Person . http://dataset.org/organizations/ UCA cerif:members http://dataset.org/people/ InvestigadorXYZ 09/11/2011 Jornadas de Software Libre y Web 2.0 38
  39. 39. PUBLISHING LINKED DATA FROM RELATIONALDATABASESCASE STUDY:THEVOA3R PROJECT 09/11/2011 Jornadas de Software Libre y Web 2.0 39
  40. 40.  Platform based on semantic technologies to integrate open contents for researchers. Manages scientific context: ◦ Organizations ◦ Research Projects ◦ Researcher Profiles ◦ etc. Publishes its data using D2R Server. 09/11/2011 Jornadas de Software Libre y Web 2.0 40
  41. 41. VOA3R Portal 09/11/2011 Jornadas de Software Libre y Web 2.0 41
  42. 42. Organization’s Data in VOA3R 09/11/2011 Jornadas de Software Libre y Web 2.0 42
  43. 43. Organization’s Data in RDF<http://voa3r.cc.uah.es/dataset/resource/organisationUnits/UAH> rdf:type cerif:OrganisationUnit ; rdfs:label "University of Alcala" ; cerif:acronym "UAH" ; foaf:homepage <http://www.uah.es> ; cerif:researchActivities "Ontologies, Linked Data" ; dcterms:subject <http://aims.fao.org/aos/agrovoc/c_7273> , <http://aims.fao.org/aos/agrovoc/c_8070> ; 09/11/2011 Jornadas de Software Libre y Web 2.0 43
  44. 44. Organization’s Data in RDF (II)…cerif:researchProjects <http://voa3r.cc.uah.es/dataset/resource/projects/Organic.Edunet> , <http://voa3r.cc.uah.es/dataset/resource/projects/Organic.Lingua> , <http://voa3r.cc.uah.es/dataset/resource/projects/VOA3R> ;cerif:innerGroups <http://voa3r.cc.uah.es/dataset/resource/organisationUnits/IERU> ;cerif:members <http://voa3r.cc.uah.es/dataset/resource/person/Salvador_Sanchez> , <http://voa3r.cc.uah.es/dataset/resource/person/Miguel_Refusta> , <http://voa3r.cc.uah.es/dataset/resource/person/Luis_Torrico> . 09/11/2011 Jornadas de Software Libre y Web 2.0 44
  45. 45. Organization’s Data via D2R 09/11/2011 Jornadas de Software Libre y Web 2.0 45
  46. 46. SPARQL Client 09/11/2011 Jornadas de Software Libre y Web 2.0 46
  47. 47. PUBLISHING LINKED DATA FROM RELATIONALDATABASESCONCLUSIONS 09/11/2011 Jornadas de Software Libre y Web 2.0 47
  48. 48. Conclusions Web based on documents  Web based on Data. Linked Data as a way for interchanging data between different datasets in the Web. RDF as a standard format to describe data. D2R allows to publish RDF metadata from databases (non-intrusive technique). Main aim: Create new third-party applications using open linked data from LD systems. 09/11/2011 Jornadas de Software Libre y Web 2.0 48
  49. 49. References Linked Data: Evolving the Web into a Global Data Space ◦ http://linkeddatabook.com/ W3C Linking Open Data Project ◦ http://www.w3.org/wiki/SweoIG/TaskForces/C ommunityProjects/LinkingOpenData D2R Server ◦ http://www4.wiwiss.fu-berlin.de/bizer/d2r- server 09/11/2011 Jornadas de Software Libre y Web 2.0 49
  50. 50. Publishing Linked Data from relational databases thanks Iván Ruiz Rube ivan.ruiz@uca.es 09/11/2011 Jornadas de Software Libre y Web 2.0 50

×