Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

SPARQL: un API per ghermire dati

906 views

Published on

Introduzione a SPARQL per muovere i primi passi nella Linked Data Cloud.

Published in: Data & Analytics
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

SPARQL: un API per ghermire dati

  1. 1. SPARQL Un’API per domarli, un’API per trovarli, un’API per ghermirli e nell'oscurità incatenarli
  2. 2. SPAR...cosa?
  3. 3. SPARQL Protocol and RDF Query Language Il linguaggio di interrogazione per grafi RDF
  4. 4. Una sola API, un mondo da esplorare
  5. 5. Le informazioni salvate in un RDF sono organizzate a grafo Nei database di tutti i giorni abbiamo a che fare con tabelle Coi linked data si usano i grafi!
  6. 6. Una query SPARQL naviga il grafo per rintracciare ciò che le diciamo di cercare Il nostro compito è tradurre una domanda in linguaggio naturale in una query SPARQL
  7. 7. Federico Fellini Italia Anita Ekberg Marcello Mastroianni 8½ La dolce vita Francia Il pianista dbo:director dbo:director dbo:country dbo:country dbo:country dbo:starred dbo:starred dbo:starred foaf:knows dbo:country
  8. 8. Quali sono i film che sono stati girati in Italia? Guardiamo nel grafo!
  9. 9. Federico Fellini Italia Anita Ekberg Marcello Mastroianni 8½ La dolce vita Francia Il pianista dbo:director dbo:director dbo:country dbo:country dbo:country dbo:starred dbo:starred dbo:starred foaf:knows dbo:country
  10. 10. 8½ La dolce vita
  11. 11. Quali sono i film che sono stati girati in Italia? SELECT ?movie WHERE { ?movie rdfs:type dbo:Film . ?movie dbo:country dbr:Italia . }
  12. 12. Quali sono i film che sono stati girati in Italia? SELECT ?movie WHERE { ?movie rdfs:type dbo:Film . ?movie dbo:country dbr:Italia . }
  13. 13. Quali sono i film che sono stati girati in Italia? SELECT ?movie WHERE { ?movie rdfs:type dbo:Film . ?movie dbo:country dbr:Italia . }
  14. 14. Quali sono i film che sono stati girati in Italia? SELECT ?movie WHERE { ?movie rdfs:type dbo:Film . ?movie dbo:country dbr:Italia . }
  15. 15. Quali sono i film che sono stati girati in Italia? SELECT ?movie WHERE { ?movie rdfs:type dbo:Film . ?movie dbo:country dbr:Italia . } ?movie è una variabile “Tutto ciò”, “ogni cosa che”
  16. 16. Quali sono i film che sono stati girati in Italia? SELECT ?movie WHERE { ?movie rdfs:type dbo:Film . ?movie dbo:country dbr:Italia . } Tutte le cose Di tipo Film
  17. 17. 8½ La dolce vita Il pianista
  18. 18. Quali sono i film che sono stati girati in Italia? SELECT ?movie WHERE { ?movie rdfs:type dbo:Film . ?movie dbo:country dbr:Italia . } Tutte le cose La cui nazione è Italia
  19. 19. Italia dbo:country ?movie dbo:country dbr:Italia
  20. 20. Federico Fellini Italia Anita Ekberg Marcello Mastroianni 8½ La dolce vita Francia Il pianista dbo:director dbo:director dbo:country dbo:country dbo:country dbo:starred dbo:starred dbo:starred foaf:knows dbo:country
  21. 21. Italia 8½ La dolce vita Francia Il pianista dbo:country dbo:country dbo:country dbo:country
  22. 22. Italia 8½ La dolce vita dbo:country dbo:country
  23. 23. 8½ La dolce vita
  24. 24. Quali sono i film che sono stati girati in Italia? SELECT ?movie WHERE { ?movie rdfs:type dbo:Film . ?movie dbo:country dbr:Italia . }
  25. 25. Come faccio a scegliere le triple da usare in una query SPARQL? Ci sono almeno due modi per capire come tradurre le domande in linguaggio naturale nei soggetti-predicati-oggetti presenti in certo grafo
  26. 26. O ntologia!
  27. 27. Query SPARQL da esplorazione Quando un’ontologia non è presente o è di difficile consultazione si può esplorare il grafo con qualche query SPARQL generica
  28. 28. Quali sono le classi presenti nel grafo? SELECT DISTINCT ?o WHERE { ?s rdfs:type ?o }
  29. 29. Federico Fellini Italia Anita Ekberg Marcello Mastroianni 8½ La dolce vita Francia Il pianista dbo:director dbo:director dbo:country dbo:country dbo:country dbo:starred dbo:starred dbo:starred foaf:knows dbo:country
  30. 30. Regista AttoreFilm Nazione
  31. 31. Quanto sono utilizzate le classi presenti nel grafo? SELECT ?o (COUNT (DISTINCT ?s) as ?n) WHERE { ?s rdfs:type ?o } ORDER BY DESC (?n)
  32. 32. Federico Fellini Italia Anita Ekberg Marcello Mastroianni 8½ La dolce vita Francia Il pianista dbo:director dbo:director dbo:country dbo:country dbo:country dbo:starred dbo:starred dbo:starred foaf:knows dbo:country
  33. 33. Regista AttoreFilm Nazione 21 3 2 ...nel nostro esempio...
  34. 34. Regista AttoreFilm Nazione 19.8025.260 106.613 3.361 ...su DBpedia...
  35. 35. Quali sono i predicati più utilizzati nel grafo? SELECT ?p (COUNT(?s) AS ?count ) WHERE { ?s ?p ?o } GROUP BY ?p ORDER BY DESC (?count)
  36. 36. Federico Fellini Italia Anita Ekberg Marcello Mastroianni 8½ La dolce vita Francia Il pianista dbo:director dbo:director dbo:country dbo:country dbo:country dbo:starred dbo:starred dbo:starred foaf:knows dbo:country
  37. 37. dbo:director dbo:director dbo:country dbo:country dbo:country dbo:starred dbo:starred dbo:starred foaf:knows dbo:country
  38. 38. Sintassi Tutti la sintassi di SPARQL 1.1 è descritta in: https://www.w3.org/TR/sparql11-query/
  39. 39. Qualche esempio reale per prendere confidenza Facciamo qualche esercizio su endpoint esistenti: ● http://dbpedia.org/sparql ● https://contrattipubblici.org/sparql
  40. 40. Ordinediesecuzione
  41. 41. SPARQL Update SPARQL può essere utilizzato anche in scrittura. Si possono modificare grafi RDF con SPARQL! https://www.w3.org/TR/2013/REC-sparql11-update-20130321/
  42. 42. Query SPARQL federate Dopo tanta fatica eccoci all’apoteosi dei Linked Data!
  43. 43. Keepintouch! Made in alessio.melandri@synapta.it @AlessioMelandri https://synapta.it @synapta CC-BY

×