SlideShare uma empresa Scribd logo
1 de 73
Baixar para ler offline
Releasing
   Relational Data to
      the Semantic Web


                          Alex Miller
               amiller@revelytix.com

           1
Semantic web
Relational data
  Federation
    HREIW
   Analytics

       2
There are things we wish
      to describe.


           3
We need some way to
 identify each thing.


          4
A URI is abo ut
                  "identifying" things,
                                        not
                 "locating" things (a
                                      URL).




On the web, we identify
  things with a URI.


           5
dbp:Chicago_(band)




dbp:Wrigley_Field
                                                        dbp:The_Blues_Brothers_(film)



                              dbp:Chicago




dbp:Chicago_Cubs                                             dbp:Barack_Obama

                                dbp:Pizza

                    dbp: http://dbpedia.org/resource/

                                   6
Things are more
interesting if we relate
         them.

Relationships are also
 described by a URI.

           7
dbp:Chicago_(band)
                                                                                          dbp:The_Blues_Brothers_(film)
  dbp:Wrigley_Field


                                                                                      n
                       db                                                          tio
                         po                                                     oca
                            :lo
                                c                                             _l
                                                                             m
                                    at
                                       ion                               :fil
                                                                      ie
                                                                   ov
                                                                  m

dbpo:owner

                                                dbp:Chicago
                                                                    dbp
                                                                       o:r
                                                                          e si
                                                                              den
                                                                                 c       e
    dbp:Chicago_Cubs
                                                                                             dbp:Barack_Obama

                                                 dbp:Pizza


                                      dbp: http://dbpedia.org/resource/
                                     dbpo: http://dbpedia.org/ontology/

                                                     8
Triple
<subject> <predicate> <object>




              9
Subject                                       dbp:Chicago_(band)
                                                                                           dbp:The_Blues_Brothers_(film)
 dbp:Wrigley_Field


                       Predicate                                                       n
                       db                                                           tio
                         po                                                       ca
                              :lo                                                o
                                    ca                                         _l
                                                                              m
                                      tio                                  fil
                                                          Object
                                                                          :
                                          n                            ie
                                                                    ov
                                                                   m

dbpo:owner

                                                dbp:Chicago
                                                                     dbp
                                                                        o:r
                                                                           e si
                                                                               den
                                                                                  c       e
    dbp:Chicago_Cubs
                                                                                              dbp:Barack_Obama

                                                  dbp:Pizza


                                       dbp: http://dbpedia.org/resource/
                                      dbpo: http://dbpedia.org/ontology/

                                                     10
<subject> <predicate> <object>

dbp:Wrigley_Field dbpo:location dbp:Chicago

   resource        resource     resource
                                   or
                                  value


                     11
dbp:Chicago_(band)
                                                                                          dbp:The_Blues_Brothers_(film)
  dbp:Wrigley_Field


                                                                                      n
                       db                                                          tio
                         po                                                     oca
                            :lo
                                c                                             _l
                                                                             m
                                    at
                                       ion                               :fil
                                                                      ie
                                                                   ov
                                                                  m

dbpo:owner

                                                dbp:Chicago
                                                                    dbp
                                                                       o:r
                                                                          e si
                                                                              den
                                                                                 c       e
    dbp:Chicago_Cubs
                                                                                             dbp:Barack_Obama

                                                 dbp:Pizza


                                      dbp: http://dbpedia.org/resource/
                                     dbpo: http://dbpedia.org/ontology/

                                                    12
Congratulations!
 You now know
      RDF.


       13
If things and relationships
   can be defined by any
   URI, how do we know
what we're talking about?


             14
We need metadata.



        15
Specifically, we need a
vocabulary of common
 terms that describe
       our data.


           16
A class describes a
group of things that
  share common
    properties.


         17
ex:City



              is a                           is a                       is a




dbp:San_Francisco                    dbp:Chicago                           dbp:Saint_Louis


                     dbp: http://dbpedia.org/resource/
                     ex: http://example.org/ontology/
                     rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
                     rdfs: http://www.w3.org/2000/01/rdf-schema#

                                           18
ex:City


                                                                          rdf:type
            rdf:type                           rdf:type




dbp:San_Francisco                      dbp:Chicago                             dbp:Saint_Louis


                       dbp: http://dbpedia.org/resource/
                       ex: http://example.org/ontology/
                       rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
                       rdfs: http://www.w3.org/2000/01/rdf-schema#

                                             19
rdfs:Class

                                               rdf:type



                                        ex:City


                                                                          rdf:type
            rdf:type                           rdf:type




dbp:San_Francisco                      dbp:Chicago                             dbp:Saint_Louis


                       dbp: http://dbpedia.org/resource/
                       ex: http://example.org/ontology/
                       rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
                       rdfs: http://www.w3.org/2000/01/rdf-schema#

                                             20
rdf:type
               ex:Location                         rdfs:Class

                        rdfs:subClassOf

                                      rdf:type
                  ex:City                          rdfs:Class




dbp: http://dbpedia.org/resource/
ex: http://example.org/ontology/
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs: http://www.w3.org/2000/01/rdf-schema#

                      21
Classes let us talk about
kinds of things. Now we
   need some way to
   describe attributes.


            22
ex:City



                                              rdf:type




                    ex:country                             ex:founded
dbp:United_States                                                        1837


                                      dbp:Chicago




                      dbp: http://dbpedia.org/resource/
                      ex: http://example.org/ontology/
                      rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
                      rdfs: http://www.w3.org/2000/01/rdf-schema#

                                            23
rdfs:do
ex:City                main
                                                    rdfs:range
                              rdf:Property                        xsd:gYear


    rdf:type
                        rdf:type



                      ex:founded
                                            1837


    dbp:Chicago




               dbp: http://dbpedia.org/resource/
               ex: http://example.org/ontology/
               rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
               rdfs: http://www.w3.org/2000/01/rdf-schema#

                                     24
Congratulations!
 You now know
  RDF Schema.


       25
How do we find stuff in
     this data?

       SPARQL


           26
ex:Baseball_Team                ex:Stadium                          ex:City


  rdf:type                    rdf:type                        rdf:type



                 dbpo:owner                        dbpo:location


                                                                   dbp:Chicago
  dbp:Chicago_Cubs
                               dbp:Wrigley_Field




                        dbp: http://dbpedia.org/resource/
                       dbpo: http://dbpedia.org/ontology/

                                         27
ex:Stadium                         ex:City


                      rdf:type                        rdf:type



         dbpo:owner                   dbpo:location
?owner                   ?stadium                           ?city




                                 28
ex:Stadium                                 ex:City

?stadium rdf:type ex:Stadium .                     ?city rdf:type ex:City .
                                 rdf:type                                rdf:type



                    dbpo:owner                           dbpo:location
   ?owner                            ?stadium                                     ?city

             ?owner dbpo:owner ?stadium .        ?stadium dbpo:location ?city .




                                            29
ex:Stadium                                 ex:City

  ?stadium rdf:type ex:Stadium .                     ?city rdf:type ex:City .
                                   rdf:type                                rdf:type



                      dbpo:owner                           dbpo:location
     ?owner                            ?stadium                                     ?city

               ?owner dbpo:owner ?stadium .        ?stadium dbpo:location ?city .



SELECT ?owner ?stadium ?city
WHERE {
  ?owner dbpo:owner ?stadium .
  ?stadium dbpo:location ?city .
  ?stadium rdf:type ex:Stadium .
  ?city rdf:type ex:City .
}
                                              30
Unions
Joins                   SPARQL
Outer joins
Filter with criteria
Project expressions
Sort
Duplicate removal
Slice (limit / offset)
Aggregates (grouping, etc)
Subqueries
               22
               31
Semantic web
Relational data
  Federation
    HREIW
   Analytics

       32
Sounds interesting.
 But my data is in a
relational database!


         33
Music Database
Musicians:
 MID         First       Last        Inst_ID
   1     Eddie         Van Halen       10
   2     Yo Yo            Ma           20
   3     Kenny            G            30




                      Instruments:     IID     Instrument     Type
                                       10        Guitar      String
                                       20        Cello       String
                                       30      Saxophone    Woodwind



                                      34
Musician Schema
    rdfs:Class                             rdf:Property

 rdf:type                                 rdf:type


                    rdfs:domain           music:firstName
 music:Musician         rdfs:doma
                                 in

                           rdfs           music:lastName
                                :dom
                                    ain

                   rdfs:range               music:plays
music:Instrument         rdfs:dom
                                 ain
                        rdfs
                             :do
                                          music:instName
                                mai
                                   n

                                          music:instType



                           35
Triples From Tables
    Musicians:                                     Instruments:
      MID    First      Last       Inst_ID           IID    Instrument     Type
       1     Eddie   Van Halen       10               10      Guitar      String
       2     Yo Yo      Ma           20               20      Cello       String
       3     Kenny       G           30               30    Saxophone    Woodwind



  Turn each key into a resource and specify the proper
  type of each resource:

artist:1 rdf:type music:Musician             instrument:10 rdf:type music:Instrument
artist:2 rdf:type music:Musician             instrument:20 rdf:type music:Instrument
artist:3 rdf:type music:Musician             instrument:30 rdf:type music:Instrument



                                             36
Triples From Tables
     Musicians:                                        Instruments:
       MID         First     Last      Inst_ID           IID      Instrument     Type
           1       Eddie   Van Halen     10               10        Guitar      String
           2       Yo Yo      Ma         20               20        Cello       String
           3       Kenny      G          30               30      Saxophone    Woodwind



   Turn each cell into a triple based on the key, property
   (mapped per column), and value:
artist:1       music:firstName "Eddie"            instrument:10   music:instName "Guitar"
artist:1       music:lastName "Van Halen"        instrument:10   music:instType "String"
artist:2       music:firstName "Yo Yo"            instrument:20   music:instName "Cello"
artist:2       music:lastName "Ma"               instrument:20   music:instType "String"
artist:3       music:firstName "Kenny"            instrument:30   music:instName "Saxophone"
artist:3       music:lastName "G"                instrument:30   music:instType "Woodwind"


                                                 37
Triples From Tables
 Musicians:                                  Instruments:
  MID     First     Last      Inst_ID          IID    Instrument     Type
   1      Eddie   Van Halen     10             10       Guitar      String
   2      Yo Yo      Ma         20             20       Cello       String
   3      Kenny      G          30             30     Saxophone    Woodwind



Turn each foreign key reference into a relationship
between the foreign and primary resources.

                  artist:1 music:plays instrument:10
                  artist:1 music:plays instrument:20
                  artist:2 music:plays instrument:30




                                        38
R2RML

• "Relational to RDF Mapping Language"
• RDB2RDF Working Group at W3C
• ETL "data transformation" use case
• Dynamic "query translation" use case
  • SPARQL to SQL

                    39
R2RML Triple Mapping
                                    ain          music:instName
                            rdfs:dom
music:Instrument
                            rdfs:d
                                  omain

                                                   music:instType




           Instruments:
             IID     Instrument           Type
              10          Guitar          String

                              40
R2RML Triple Mapping
                                           ain          music:instName
                                   rdfs:dom
      music:Instrument
                                   rdfs:d
                                         omain

                                                          music:instType




Triples Map       rr:tableName

                 Instruments:
                   IID       Instrument          Type
                    10           Guitar          String

                                     40
R2RML Triple Mapping
                                                   ain          music:instName
                                           rdfs:dom
      music:Instrument
                                           rdfs:d
                                                 omain
                    rr:class                                      music:instType

              Subject Map
          "http://example.com/music/
                   Inst-{iid}"




Triples Map              rr:tableName

                        Instruments:
                           IID         Instrument        Type
                            10           Guitar          String

                                             40
R2RML Triple Mapping
                                                   ain          music:instName
                                           rdfs:dom
      music:Instrument
                                           rdfs:d
                                                 omain
                    rr:class                                      music:instType
                                                                                rr:predicate
              Subject Map
          "http://example.com/music/
                   Inst-{iid}"
                                                                            Predicate Map
                                            Predicate Object
                                                  Map
                                                                              Object Map
Triples Map              rr:tableName

                        Instruments:                                     rr:column

                           IID         Instrument        Type
                            10           Guitar          String

                                             40
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix music: <http://example.com/music/> .
@prefix mapping: <http://example.com/ont/> .

mapping:InstrumentMapping
    a rr:TriplesMapClass;
    rr:tableName "Instruments";
    rr:subjectMap [
       rr:template "http://example.com/music/Inst-{iid}";
       rr:class     music:Instrument
    ];
    rr:predicateObjectMap [
       rr:predicateMap [ rr:predicate music:instName ];
       rr:objectMap      [ rr:column "instrument" ];
    ];
    rr:predicateObjectMap [
       rr:predicateMap [ rr:predicate music:instType ];
       rr:objectMap      [ rr:column "type" ];
    ];
.

                             41
SPARQL translation
    SPARQL        Solutions




          R2RML

    SQL               Results



          Database




             42
Semantic web
Relational data
  Federation
    HREIW
   Analytics

       43
SPARQL Protocol

• Standard HTTP API for calling a SPARQL
  processor

• Supported by all major triple stores and
  query processors



                      44
SPARQL Federation
SELECT ?artist ?song ?buyLink              Return Federated data
WHERE {
 SERVICE <http://listening> {
  ?listened rdf:type listen:event .        Call SPARQL endpoint that tracks
  ?listened listen:artist ?artist .        your listening (like last.fm)
  ?listened listen:song ?song }
 OPTIONAL {
  SERVICE <http://amazon> {                Call Amazon endpoint to get info
    ?isbn rdf:type amaz:mp3 .
                                           on where to download the song.
    ?isbn amaz:artist ?artist .
    ?isbn amaz:song ?song .
    ?isbn amaz:link ?buyLink } } }


                                      45
Service Descriptions




         46
Federator
           SPARQL Endpoint

                                         Ontology and
             Federator                  service registry


 R2RML          Web          SPARQL
Endpoint      Endpoint       Endpoint


  Data           Db           Triple
  base          pedia         Store




                         47
Named graph mapping


• Services can provide named graphs,
  described in their service description

• Federator lets you create federated
  named graphs that map to service
  named graphs


                     48
Data integration


• Performance - data volume from sources
  is key

• Source capabilities
• Source statistics


                      49
Performance concerns:
        data volume
                         SELECT ...
                         FILTER (?age >= 24) ...
Reduction factors:
 •criteria                   Domain
 •minimal projection




                                                           Results
                                                   Query
 •aggregation
 •joins (sometimes)
 •dup removal
                       WHERE Person.age >= 24



                        50
Performance concerns:
    federated joins




          51
Data source capabilities

• SQL support
• Function support
• Function translation
• Inverse functions
• Data type mappings and translations

                      52
Data source statistics


• Table cardinality
• Column selectivity
• Column null density
• Join selectivity


                       53
Semantic web
Relational data
  Federation
    HREIW
   Analytics

       54
HREIW - HR Analysis




         55
“Which Marines that speak French and/
 or French Creole have had at least six
 months since their last deployment?”




                   56
“How many discharges were the
result of the Don’t Ask Don’t Tell
         policy per year?”




                57
“What is the average length of service for
soldiers deployed in Afghanistan vs Iraq?”




                    58
Where’s the data?




        59
Ontologies
                        HR Standards
            HR Domain



Mapping

Sources




                60
Technologies
                                                cs
                                         Analyti


                      y
                                                     HR Standards
             Ontolog
                     ment
            develo p
                        HR Domain
                             SPARQL
                            Federation



Mapping
                                                             Rule
                                                                    s

Sources
          SPARQL to
           database




                                 61
Collaborative Ontologies
                    model




              Domain
              ontology
             wiki      discuss
Ontologist                       Subject Matter
                                    Experts
                diagram


                    discuss




                         62
Ontology Visualization




          63
Semantic web
Relational data
  Federation
    HREIW
   Analytics

       64
RIF
• Rule Interchange Format, W3C recommendation
• Rule = IF - THEN statement
• Used to derive new triples from existing triples
• Dialects
   • Core
   • Framework for Logic Dialects (FLD)
   • Basic Logic Dialect (BLD)
   • Production Rules Dialect (PRD)
• Rex - Revelytix RIF Core implementation

                                 65
Dashboards




    66
Dashboards




    67
Dashboards




    68
Enterprise Semantic Web
• Knoodl - collaborative ontology creation
• OntVis - ontology visualization (OWL)
• Spyder - SPARQL to SQL (RDF, R2RML)
• Federator - SPARQL federation (SPARQL 1.1,
  SPARQL Federation extensions)

• Rex - entailment with rules (RIF)
• Dashboards - analytics, visualization
                        69
More information
• Revelytix - http://revelytix.com
• Knoodl - http://knoodl.com
• OntVis - http://bit.ly/hLm3sd
• Spyder - http://revelytix.com/content/spyder
• Federator - beta coming soon...
• Rex - beta coming soon...


                          70

Mais conteúdo relacionado

Destaque

Groovy concurrency
Groovy concurrencyGroovy concurrency
Groovy concurrencyAlex Miller
 
Scaling Hibernate with Terracotta
Scaling Hibernate with TerracottaScaling Hibernate with Terracotta
Scaling Hibernate with TerracottaAlex Miller
 
Java Concurrency Gotchas
Java Concurrency GotchasJava Concurrency Gotchas
Java Concurrency GotchasAlex Miller
 
Cracking clojure
Cracking clojureCracking clojure
Cracking clojureAlex Miller
 
Clojure: The Art of Abstraction
Clojure: The Art of AbstractionClojure: The Art of Abstraction
Clojure: The Art of AbstractionAlex Miller
 
Visualising Data on Interactive Maps
Visualising Data on Interactive MapsVisualising Data on Interactive Maps
Visualising Data on Interactive MapsAnna Pawlicka
 
Concurrent Stream Processing
Concurrent Stream ProcessingConcurrent Stream Processing
Concurrent Stream ProcessingAlex Miller
 
Tree Editing with Zippers
Tree Editing with ZippersTree Editing with Zippers
Tree Editing with ZippersAlex Miller
 
Strange Loop Conference 2009
Strange Loop Conference 2009Strange Loop Conference 2009
Strange Loop Conference 2009Alex Miller
 
Clojure/West Overview (12/1/11)
Clojure/West Overview (12/1/11)Clojure/West Overview (12/1/11)
Clojure/West Overview (12/1/11)Alex Miller
 
Scaling Your Cache And Caching At Scale
Scaling Your Cache And Caching At ScaleScaling Your Cache And Caching At Scale
Scaling Your Cache And Caching At ScaleAlex Miller
 
Collections In Java
Collections In JavaCollections In Java
Collections In JavaBinoj T E
 
Collection Framework in java
Collection Framework in javaCollection Framework in java
Collection Framework in javaCPD INDIA
 
Marshmallow Test
Marshmallow TestMarshmallow Test
Marshmallow TestAlex Miller
 
Java Collection framework
Java Collection frameworkJava Collection framework
Java Collection frameworkankitgarg_er
 
Java Collections
Java CollectionsJava Collections
Java Collectionsparag
 
Java Collections API
Java Collections APIJava Collections API
Java Collections APIAlex Miller
 
Java - Collections framework
Java - Collections frameworkJava - Collections framework
Java - Collections frameworkRiccardo Cardin
 

Destaque (20)

Groovy concurrency
Groovy concurrencyGroovy concurrency
Groovy concurrency
 
Scaling Hibernate with Terracotta
Scaling Hibernate with TerracottaScaling Hibernate with Terracotta
Scaling Hibernate with Terracotta
 
Java Concurrency Gotchas
Java Concurrency GotchasJava Concurrency Gotchas
Java Concurrency Gotchas
 
Cracking clojure
Cracking clojureCracking clojure
Cracking clojure
 
Clojure: The Art of Abstraction
Clojure: The Art of AbstractionClojure: The Art of Abstraction
Clojure: The Art of Abstraction
 
Visualising Data on Interactive Maps
Visualising Data on Interactive MapsVisualising Data on Interactive Maps
Visualising Data on Interactive Maps
 
Concurrent Stream Processing
Concurrent Stream ProcessingConcurrent Stream Processing
Concurrent Stream Processing
 
Tree Editing with Zippers
Tree Editing with ZippersTree Editing with Zippers
Tree Editing with Zippers
 
Strange Loop Conference 2009
Strange Loop Conference 2009Strange Loop Conference 2009
Strange Loop Conference 2009
 
Clojure/West Overview (12/1/11)
Clojure/West Overview (12/1/11)Clojure/West Overview (12/1/11)
Clojure/West Overview (12/1/11)
 
Java collection
Java collectionJava collection
Java collection
 
Scaling Your Cache And Caching At Scale
Scaling Your Cache And Caching At ScaleScaling Your Cache And Caching At Scale
Scaling Your Cache And Caching At Scale
 
07 java collection
07 java collection07 java collection
07 java collection
 
Collections In Java
Collections In JavaCollections In Java
Collections In Java
 
Collection Framework in java
Collection Framework in javaCollection Framework in java
Collection Framework in java
 
Marshmallow Test
Marshmallow TestMarshmallow Test
Marshmallow Test
 
Java Collection framework
Java Collection frameworkJava Collection framework
Java Collection framework
 
Java Collections
Java CollectionsJava Collections
Java Collections
 
Java Collections API
Java Collections APIJava Collections API
Java Collections API
 
Java - Collections framework
Java - Collections frameworkJava - Collections framework
Java - Collections framework
 

Mais de Alex Miller

Java Concurrency Idioms
Java Concurrency IdiomsJava Concurrency Idioms
Java Concurrency IdiomsAlex Miller
 
Design Patterns Reconsidered
Design Patterns ReconsideredDesign Patterns Reconsidered
Design Patterns ReconsideredAlex Miller
 
Exploring Terracotta
Exploring TerracottaExploring Terracotta
Exploring TerracottaAlex Miller
 
Actor Concurrency
Actor ConcurrencyActor Concurrency
Actor ConcurrencyAlex Miller
 
Java Concurrency Gotchas
Java Concurrency GotchasJava Concurrency Gotchas
Java Concurrency GotchasAlex Miller
 

Mais de Alex Miller (6)

Java Concurrency Idioms
Java Concurrency IdiomsJava Concurrency Idioms
Java Concurrency Idioms
 
Design Patterns Reconsidered
Design Patterns ReconsideredDesign Patterns Reconsidered
Design Patterns Reconsidered
 
Java 7 Preview
Java 7 PreviewJava 7 Preview
Java 7 Preview
 
Exploring Terracotta
Exploring TerracottaExploring Terracotta
Exploring Terracotta
 
Actor Concurrency
Actor ConcurrencyActor Concurrency
Actor Concurrency
 
Java Concurrency Gotchas
Java Concurrency GotchasJava Concurrency Gotchas
Java Concurrency Gotchas
 

Último

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Último (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

Releasing Relational Data to the Semantic Web

  • 1. Releasing Relational Data to the Semantic Web Alex Miller amiller@revelytix.com 1
  • 2. Semantic web Relational data Federation HREIW Analytics 2
  • 3. There are things we wish to describe. 3
  • 4. We need some way to identify each thing. 4
  • 5. A URI is abo ut "identifying" things, not "locating" things (a URL). On the web, we identify things with a URI. 5
  • 6. dbp:Chicago_(band) dbp:Wrigley_Field dbp:The_Blues_Brothers_(film) dbp:Chicago dbp:Chicago_Cubs dbp:Barack_Obama dbp:Pizza dbp: http://dbpedia.org/resource/ 6
  • 7. Things are more interesting if we relate them. Relationships are also described by a URI. 7
  • 8. dbp:Chicago_(band) dbp:The_Blues_Brothers_(film) dbp:Wrigley_Field n db tio po oca :lo c _l m at ion :fil ie ov m dbpo:owner dbp:Chicago dbp o:r e si den c e dbp:Chicago_Cubs dbp:Barack_Obama dbp:Pizza dbp: http://dbpedia.org/resource/ dbpo: http://dbpedia.org/ontology/ 8
  • 10. Subject dbp:Chicago_(band) dbp:The_Blues_Brothers_(film) dbp:Wrigley_Field Predicate n db tio po ca :lo o ca _l m tio fil Object : n ie ov m dbpo:owner dbp:Chicago dbp o:r e si den c e dbp:Chicago_Cubs dbp:Barack_Obama dbp:Pizza dbp: http://dbpedia.org/resource/ dbpo: http://dbpedia.org/ontology/ 10
  • 11. <subject> <predicate> <object> dbp:Wrigley_Field dbpo:location dbp:Chicago resource resource resource or value 11
  • 12. dbp:Chicago_(band) dbp:The_Blues_Brothers_(film) dbp:Wrigley_Field n db tio po oca :lo c _l m at ion :fil ie ov m dbpo:owner dbp:Chicago dbp o:r e si den c e dbp:Chicago_Cubs dbp:Barack_Obama dbp:Pizza dbp: http://dbpedia.org/resource/ dbpo: http://dbpedia.org/ontology/ 12
  • 13. Congratulations! You now know RDF. 13
  • 14. If things and relationships can be defined by any URI, how do we know what we're talking about? 14
  • 16. Specifically, we need a vocabulary of common terms that describe our data. 16
  • 17. A class describes a group of things that share common properties. 17
  • 18. ex:City is a is a is a dbp:San_Francisco dbp:Chicago dbp:Saint_Louis dbp: http://dbpedia.org/resource/ ex: http://example.org/ontology/ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# 18
  • 19. ex:City rdf:type rdf:type rdf:type dbp:San_Francisco dbp:Chicago dbp:Saint_Louis dbp: http://dbpedia.org/resource/ ex: http://example.org/ontology/ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# 19
  • 20. rdfs:Class rdf:type ex:City rdf:type rdf:type rdf:type dbp:San_Francisco dbp:Chicago dbp:Saint_Louis dbp: http://dbpedia.org/resource/ ex: http://example.org/ontology/ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# 20
  • 21. rdf:type ex:Location rdfs:Class rdfs:subClassOf rdf:type ex:City rdfs:Class dbp: http://dbpedia.org/resource/ ex: http://example.org/ontology/ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# 21
  • 22. Classes let us talk about kinds of things. Now we need some way to describe attributes. 22
  • 23. ex:City rdf:type ex:country ex:founded dbp:United_States 1837 dbp:Chicago dbp: http://dbpedia.org/resource/ ex: http://example.org/ontology/ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# 23
  • 24. rdfs:do ex:City main rdfs:range rdf:Property xsd:gYear rdf:type rdf:type ex:founded 1837 dbp:Chicago dbp: http://dbpedia.org/resource/ ex: http://example.org/ontology/ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# 24
  • 25. Congratulations! You now know RDF Schema. 25
  • 26. How do we find stuff in this data? SPARQL 26
  • 27. ex:Baseball_Team ex:Stadium ex:City rdf:type rdf:type rdf:type dbpo:owner dbpo:location dbp:Chicago dbp:Chicago_Cubs dbp:Wrigley_Field dbp: http://dbpedia.org/resource/ dbpo: http://dbpedia.org/ontology/ 27
  • 28. ex:Stadium ex:City rdf:type rdf:type dbpo:owner dbpo:location ?owner ?stadium ?city 28
  • 29. ex:Stadium ex:City ?stadium rdf:type ex:Stadium . ?city rdf:type ex:City . rdf:type rdf:type dbpo:owner dbpo:location ?owner ?stadium ?city ?owner dbpo:owner ?stadium . ?stadium dbpo:location ?city . 29
  • 30. ex:Stadium ex:City ?stadium rdf:type ex:Stadium . ?city rdf:type ex:City . rdf:type rdf:type dbpo:owner dbpo:location ?owner ?stadium ?city ?owner dbpo:owner ?stadium . ?stadium dbpo:location ?city . SELECT ?owner ?stadium ?city WHERE { ?owner dbpo:owner ?stadium . ?stadium dbpo:location ?city . ?stadium rdf:type ex:Stadium . ?city rdf:type ex:City . } 30
  • 31. Unions Joins SPARQL Outer joins Filter with criteria Project expressions Sort Duplicate removal Slice (limit / offset) Aggregates (grouping, etc) Subqueries 22 31
  • 32. Semantic web Relational data Federation HREIW Analytics 32
  • 33. Sounds interesting. But my data is in a relational database! 33
  • 34. Music Database Musicians: MID First Last Inst_ID 1 Eddie Van Halen 10 2 Yo Yo Ma 20 3 Kenny G 30 Instruments: IID Instrument Type 10 Guitar String 20 Cello String 30 Saxophone Woodwind 34
  • 35. Musician Schema rdfs:Class rdf:Property rdf:type rdf:type rdfs:domain music:firstName music:Musician rdfs:doma in rdfs music:lastName :dom ain rdfs:range music:plays music:Instrument rdfs:dom ain rdfs :do music:instName mai n music:instType 35
  • 36. Triples From Tables Musicians: Instruments: MID First Last Inst_ID IID Instrument Type 1 Eddie Van Halen 10 10 Guitar String 2 Yo Yo Ma 20 20 Cello String 3 Kenny G 30 30 Saxophone Woodwind Turn each key into a resource and specify the proper type of each resource: artist:1 rdf:type music:Musician instrument:10 rdf:type music:Instrument artist:2 rdf:type music:Musician instrument:20 rdf:type music:Instrument artist:3 rdf:type music:Musician instrument:30 rdf:type music:Instrument 36
  • 37. Triples From Tables Musicians: Instruments: MID First Last Inst_ID IID Instrument Type 1 Eddie Van Halen 10 10 Guitar String 2 Yo Yo Ma 20 20 Cello String 3 Kenny G 30 30 Saxophone Woodwind Turn each cell into a triple based on the key, property (mapped per column), and value: artist:1 music:firstName "Eddie" instrument:10 music:instName "Guitar" artist:1 music:lastName "Van Halen" instrument:10 music:instType "String" artist:2 music:firstName "Yo Yo" instrument:20 music:instName "Cello" artist:2 music:lastName "Ma" instrument:20 music:instType "String" artist:3 music:firstName "Kenny" instrument:30 music:instName "Saxophone" artist:3 music:lastName "G" instrument:30 music:instType "Woodwind" 37
  • 38. Triples From Tables Musicians: Instruments: MID First Last Inst_ID IID Instrument Type 1 Eddie Van Halen 10 10 Guitar String 2 Yo Yo Ma 20 20 Cello String 3 Kenny G 30 30 Saxophone Woodwind Turn each foreign key reference into a relationship between the foreign and primary resources. artist:1 music:plays instrument:10 artist:1 music:plays instrument:20 artist:2 music:plays instrument:30 38
  • 39. R2RML • "Relational to RDF Mapping Language" • RDB2RDF Working Group at W3C • ETL "data transformation" use case • Dynamic "query translation" use case • SPARQL to SQL 39
  • 40. R2RML Triple Mapping ain music:instName rdfs:dom music:Instrument rdfs:d omain music:instType Instruments: IID Instrument Type 10 Guitar String 40
  • 41. R2RML Triple Mapping ain music:instName rdfs:dom music:Instrument rdfs:d omain music:instType Triples Map rr:tableName Instruments: IID Instrument Type 10 Guitar String 40
  • 42. R2RML Triple Mapping ain music:instName rdfs:dom music:Instrument rdfs:d omain rr:class music:instType Subject Map "http://example.com/music/ Inst-{iid}" Triples Map rr:tableName Instruments: IID Instrument Type 10 Guitar String 40
  • 43. R2RML Triple Mapping ain music:instName rdfs:dom music:Instrument rdfs:d omain rr:class music:instType rr:predicate Subject Map "http://example.com/music/ Inst-{iid}" Predicate Map Predicate Object Map Object Map Triples Map rr:tableName Instruments: rr:column IID Instrument Type 10 Guitar String 40
  • 44. @prefix rr: <http://www.w3.org/ns/r2rml#> . @prefix music: <http://example.com/music/> . @prefix mapping: <http://example.com/ont/> . mapping:InstrumentMapping a rr:TriplesMapClass; rr:tableName "Instruments"; rr:subjectMap [ rr:template "http://example.com/music/Inst-{iid}"; rr:class music:Instrument ]; rr:predicateObjectMap [ rr:predicateMap [ rr:predicate music:instName ]; rr:objectMap [ rr:column "instrument" ]; ]; rr:predicateObjectMap [ rr:predicateMap [ rr:predicate music:instType ]; rr:objectMap [ rr:column "type" ]; ]; . 41
  • 45. SPARQL translation SPARQL Solutions R2RML SQL Results Database 42
  • 46. Semantic web Relational data Federation HREIW Analytics 43
  • 47. SPARQL Protocol • Standard HTTP API for calling a SPARQL processor • Supported by all major triple stores and query processors 44
  • 48. SPARQL Federation SELECT ?artist ?song ?buyLink Return Federated data WHERE { SERVICE <http://listening> { ?listened rdf:type listen:event . Call SPARQL endpoint that tracks ?listened listen:artist ?artist . your listening (like last.fm) ?listened listen:song ?song } OPTIONAL { SERVICE <http://amazon> { Call Amazon endpoint to get info ?isbn rdf:type amaz:mp3 . on where to download the song. ?isbn amaz:artist ?artist . ?isbn amaz:song ?song . ?isbn amaz:link ?buyLink } } } 45
  • 50. Federator SPARQL Endpoint Ontology and Federator service registry R2RML Web SPARQL Endpoint Endpoint Endpoint Data Db Triple base pedia Store 47
  • 51. Named graph mapping • Services can provide named graphs, described in their service description • Federator lets you create federated named graphs that map to service named graphs 48
  • 52. Data integration • Performance - data volume from sources is key • Source capabilities • Source statistics 49
  • 53. Performance concerns: data volume SELECT ... FILTER (?age >= 24) ... Reduction factors: •criteria Domain •minimal projection Results Query •aggregation •joins (sometimes) •dup removal WHERE Person.age >= 24 50
  • 54. Performance concerns: federated joins 51
  • 55. Data source capabilities • SQL support • Function support • Function translation • Inverse functions • Data type mappings and translations 52
  • 56. Data source statistics • Table cardinality • Column selectivity • Column null density • Join selectivity 53
  • 57. Semantic web Relational data Federation HREIW Analytics 54
  • 58. HREIW - HR Analysis 55
  • 59. “Which Marines that speak French and/ or French Creole have had at least six months since their last deployment?” 56
  • 60. “How many discharges were the result of the Don’t Ask Don’t Tell policy per year?” 57
  • 61. “What is the average length of service for soldiers deployed in Afghanistan vs Iraq?” 58
  • 63. Ontologies HR Standards HR Domain Mapping Sources 60
  • 64. Technologies cs Analyti y HR Standards Ontolog ment develo p HR Domain SPARQL Federation Mapping Rule s Sources SPARQL to database 61
  • 65. Collaborative Ontologies model Domain ontology wiki discuss Ontologist Subject Matter Experts diagram discuss 62
  • 67. Semantic web Relational data Federation HREIW Analytics 64
  • 68. RIF • Rule Interchange Format, W3C recommendation • Rule = IF - THEN statement • Used to derive new triples from existing triples • Dialects • Core • Framework for Logic Dialects (FLD) • Basic Logic Dialect (BLD) • Production Rules Dialect (PRD) • Rex - Revelytix RIF Core implementation 65
  • 72. Enterprise Semantic Web • Knoodl - collaborative ontology creation • OntVis - ontology visualization (OWL) • Spyder - SPARQL to SQL (RDF, R2RML) • Federator - SPARQL federation (SPARQL 1.1, SPARQL Federation extensions) • Rex - entailment with rules (RIF) • Dashboards - analytics, visualization 69
  • 73. More information • Revelytix - http://revelytix.com • Knoodl - http://knoodl.com • OntVis - http://bit.ly/hLm3sd • Spyder - http://revelytix.com/content/spyder • Federator - beta coming soon... • Rex - beta coming soon... 70