SlideShare a Scribd company logo
1 of 96
Download to read offline
An
                              Introduction
                                        to
                               Linked Data




                Part 2 of 5              David Hyland-Wood
             Data Modeling    University of Mary Washington

Monday, May 16, 2011
Data modeling
                 without context
Monday, May 16, 2011
Modeling without Context




Monday, May 16, 2011
Modeling without Context
                   • Model the Real World




Monday, May 16, 2011
Modeling without Context
                   • Model the Real World
                   • Look for objects of interest




Monday, May 16, 2011
Modeling without Context
                   • Model the Real World
                   • Look for objects of interest
                   • Put aside the immediate needs of any
                       application




Monday, May 16, 2011
Modeling without Context
                   • Model the Real World
                   • Look for objects of interest
                   • Put aside the immediate needs of any
                       application
                   • Investigate how others are already
                       modeling similar or related data




Monday, May 16, 2011
Modeling without Context
                   • Model the Real World
                   • Look for objects of interest
                   • Put aside the immediate needs of any
                       application
                   • Investigate how others are already
                       modeling similar or related data
                   • These techniques allow for re-use and
                       merging


Monday, May 16, 2011
Modeling without Context




Monday, May 16, 2011
Modeling without Context
                   • Look for duplication (normalise)




Monday, May 16, 2011
Modeling without Context
                   • Look for duplication (normalise)
                   • Think about time and events, as well as
                       things




Monday, May 16, 2011
Modeling without Context
                   • Look for duplication (normalise)
                   • Think about time and events, as well as
                       things
                   • Consider how the data will change over
                       time




Monday, May 16, 2011
Modeling without Context
                   • Look for duplication (normalise)
                   • Think about time and events, as well as
                       things
                   • Consider how the data will change over
                       time
                   • Separate real-world (non-information
                       resources) and online (information
                       resources)



Monday, May 16, 2011
Objects of Interest



                       Apollo 11 Command and   crew
                                                      Buzz Aldrin
                           Service Module




Monday, May 16, 2011
Objects of Interest



                       Apollo 11 Command and   crew
                                                      Buzz Buzz Aldrin
                                                           Aldrin
                           Service Module




Monday, May 16, 2011
Objects of Interest
                                                            20 January 1930




                                               Person

                                                              born

                                                        a




                       Apollo 11 Command and   crew
                                                                 Buzz Buzz Aldrin
                                                                      Aldrin
                           Service Module




Monday, May 16, 2011
Objects of Interest
                                                            20 January 1930




                                               Person

                                                              born

                                                        a




                       Apollo 11 Command and   crew
                                                                 Buzz Aldrin
                           Service Module




                                                             name




                                                                Buzz Aldrin




Monday, May 16, 2011
Apollo 11 Command and                              launchsite
                                                                                       Cape Canaveral
                           Service Module




                                 name                                                      name
                                           Apollo 11 Command and Service Module                         Cape Canaveral, United States




                          launched
                                                       16 July 1969




                            mass
                                                         28801.0




                             a
                                                  Spacecraft




Monday, May 16, 2011
URIs:
                       Naming Things
                        on the Web
Monday, May 16, 2011
Naming Things on the Web
                   • Use http:// URIs
                        There are other URIs, but http URIs can be used to get more
                        information quickly and easily


                   • Use clean, stable URIs
                        Abstract away implementation details
                        Ensure they are reliable


                   • There are two types of resource, both
                        require URIs
                        Information Resources — Web pages, images, CSS files etc.
                        Non-Information Resources — People, places, events, concepts etc.




Monday, May 16, 2011
Distinguishing Resources
               http://example.com/1969-059A            ← Thing


               http://example.com/1969-059A.rdf        ← RDF data


               http://example.com/1969-059A.html       ← HTML page




               http://example.com/1969-059A            ← Thing


               http://example.com/1969-059A/rdf        ← RDF data


               http://example.com/1969-059A/html       ← HTML page




               http://example.com/resource/1969-059A   ← Thing


               http://example.com/data/1969-059A       ← RDF data


               http://example.com/page/1969-059A       ← HTML page




Monday, May 16, 2011
Use URIs

                       http://.../topics/physics
                       URIs provide names for resources
                       You can say things about resources




                       "Physics"
                       Literal values are displayable labels
                       You can't say more things about "Physics"




Monday, May 16, 2011
Use Your Own Domain

                        http://yours.com/spacecraft/1959-059A
                        I own the domain, so I can control the meaning of the URI
                        I can also commit to its permanence and provide data at this
                        address




                        http://theirs.com/spacecraft/1959-059A
                        I don't own this domain, so I can't put any data there
                        The domain owner may choose to use this URI to mean
                        something different to me




Monday, May 16, 2011
Use Neutral URIs

                       http://.../spacecraft/1959-059A
                       The URI contains meaningful, natural or system-neutral keys.
                       I can route these URIs to any implementation, meaning they
                       can live forever
                       Bonus: I'm not advertising my technology choices




                       http://.../index.aspx?id=3
                       Nobody wants to know that you're using ASP.Net, really
                       How will you keep URIs the same when you change or
                       upgrade your technology?




Monday, May 16, 2011
Use http:// URIs

                       http://.../spacecraft/1969-059A
                       everyone know what to do with http:// URIs
                       http:// URIs provide a quick, easy and scalable lookup
                       mechanism




                       info:space/1969-059A
                       http://info-uri.info
                       info URIs require specialised knowledge
                       info URIs provide no lookup mechanism




Monday, May 16, 2011
Use Natural Keys

                       http://.../spacecraft/1969-059A
                       Anyone working with the original data can 'guess' your URIs
                       You can visually debug, and remember, your own URIs




                       http://.../809c6e
                       Nobody can guess this




Monday, May 16, 2011
Use Containers (sparingly)

                          http://.../spacecraft/1969-059A
                          Containers help keep natural keys separate
                          Containers provide a natural place to put lists




                           http://.../1969-059A
                           What URI do I put a list of all the spacecraft at now?




Monday, May 16, 2011
Use Dates (sparingly)

                        http://.../statistics/2010/agencies
                        Dates provide a way to show data from a period in time
                        Most useful for things like statistics, samples or readings




                        http://.../statistics/agencies
                        Where am I going to put next year's statistics?




Monday, May 16, 2011
Distinguishing Resources
               http://example.com/1969-059A.html#self   ← Thing


               http://example.com/1969-059A.html        ← HTML page




Monday, May 16, 2011
Fragment Identifiers #
                   • Useful, with caution
                   • Fragment identifiers are not sent to the
                       server
                   • Limits server-side decision making
                   • Limits granularity of the response
                   • Sometimes used with schema when
                       terms link to human-readable
                       documentation on the Web.


Monday, May 16, 2011
Turtle:
                       Terse RDF Triple
                          Language
Monday, May 16, 2011
Turtle
                   • Terse Triple Language (TTL)
                       http://www.w3.org/2007/02/turtle/primer/


                   • A human-readable notation for RDF
                   • Provides useful syntax for quickly
                       hand-writing RDF
                   • Forms the basis of patterns in
                       SPARQL




Monday, May 16, 2011
http://...   a       http://...
                       /1969-059A           /Spacecraft




           <http://.../1969-059A> a <http://.../Spacecraft> .




Monday, May 16, 2011
Monday, May 16, 2011
http://...
              /1969-059A




                             <http://example.com/spacecraft/1969-059A>




Monday, May 16, 2011
http://...
              /1969-059A




                                            <http://example.com/spacecraft/1969-059A>
                                              a space:Spacecraft ;




                 a             http://...
                             /Spacecraft




Monday, May 16, 2011
http://...
              /1969-059A



                     name
                             Apollo 11 Command and Service Module




                                                                    <http://example.com/spacecraft/1969-059A>
                                                                      a space:Spacecraft ;
                                                                      space:name "Apollo 11 Command and Service Module" ;



                 a                http://...
                                /Spacecraft




Monday, May 16, 2011
http://...
              /1969-059A



                     name
                             Apollo 11 Command and Service Module




                launched
                                         16 July 1969



                                                                    <http://example.com/spacecraft/1969-059A>
                                                                      a space:Spacecraft ;
                                                                      space:name "Apollo 11 Command and Service Module" ;
                                                                      space:launched "1969-07-16"^^xsd:date ;


                 a                http://...
                                /Spacecraft




Monday, May 16, 2011
http://...
              /1969-059A



                     name
                             Apollo 11 Command and Service Module




                launched
                                         16 July 1969



                                                                    <http://example.com/spacecraft/1969-059A>
                 mass
                                           28801.0                    a space:Spacecraft ;
                                                                      space:name "Apollo 11 Command and Service Module" ;
                                                                      space:launched "1969-07-16"^^xsd:date ;
                                                                      space:mass 28801.0 .
                 a                http://...
                                /Spacecraft




Monday, May 16, 2011
http://...
              /1969-059A



                     name
                             Apollo 11 Command and Service Module




                launched                                            @prefix space: <http://example.com/space-schema/> .
                                         16 July 1969
                                                                    @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

                                                                    <http://example.com/spacecraft/1969-059A>
                 mass
                                           28801.0                    a space:Spacecraft ;
                                                                      space:name "Apollo 11 Command and Service Module" ;
                                                                      space:launched "1969-07-16"^^xsd:date ;
                                                                      space:mass 28801.0 .
                 a                http://...
                                /Spacecraft




Monday, May 16, 2011
Example Turtle
    @prefix space: <http://example.com/space-schema/> .
    @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

    <http://example.com/spacecraft/1969-059A>
      a space:Spacecraft ;
      space:name "Apollo 11 Command and Service Module" ;
      space:launched "1969-07-16"^^xsd:date ;
      space:mass 28801.0 .




Monday, May 16, 2011
http://...
              /1969-059A



                     name
                             Apollo 11 Command and Service Module




                launched                                            @prefix space: <http://example.com/space-schema/> .
                                         16 July 1969
                                                                    @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

                                                                    <http://example.com/spacecraft/1969-059A>
                 mass
                                           28801.0                    a space:Spacecraft ;
                                                                      space:name "Apollo 11 Command and Service Module" ;
                                                                      space:launched "1969-07-16"^^xsd:date ;
                                                                      space:mass 28801.0 .
                 a                http://...
                                /Spacecraft




Monday, May 16, 2011
http://...                                  launchsite                 http://...
              /1969-059A                                                            /cape+cana...



                     name                                                                name
                             Apollo 11 Command and Service Module                                   Cape Canaveral, United States




                launched                                             @prefix space: <http://example.com/space-schema/> .
                                         16 July 1969
                                                                     @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

                                                                     <http://example.com/spacecraft/1969-059A>
                 mass
                                           28801.0                       a space:Spacecraft ;
                                                                         space:name "Apollo 11 Command and Service Module" ;
                                                                         space:launched "1969-07-16"^^xsd:date ;
                                                                         space:mass 28801.0 .
                 a                http://...
                                /Spacecraft




Monday, May 16, 2011
http://...                                  launchsite                 http://...
              /1969-059A                                                            /cape+cana...



                     name                                                                name
                             Apollo 11 Command and Service Module                                   Cape Canaveral, United States




                launched                                             @prefix space: <http://example.com/space-schema/> .
                                         16 July 1969
                                                                     @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

                                                                     <http://example.com/spacecraft/1969-059A>
                 mass
                                           28801.0                       a space:Spacecraft ;
                                                                         space:name "Apollo 11 Command and Service Module" ;
                                                                         space:launched "1969-07-16"^^xsd:date ;
                                                                         space:mass 28801.0 .
                                                                                            ;
                 a                http://...                             space:launchsite <http://.../cape+cana...> .
                                /Spacecraft




Monday, May 16, 2011
http://...                                  launchsite                 http://...
              /1969-059A                                                            /cape+cana...



                     name                                                                name
                             Apollo 11 Command and Service Module                                   Cape Canaveral, United States




                launched                                             @prefix space: <http://example.com/space-schema/> .
                                         16 July 1969
                                                                     @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

                                                                     <http://example.com/spacecraft/1969-059A>
                 mass
                                           28801.0                       a space:Spacecraft ;
                                                                         space:name "Apollo 11 Command and Service Module" ;
                                                                         space:launched "1969-07-16"^^xsd:date ;
                                                                         space:mass 28801.0 .
                                                                                            ;
                 a                http://...                             space:launchsite <http://.../cape+cana...> .
                                /Spacecraft

                                                                     <http://.../cape+cana...>
                                                                       space:name "Cape Canaveral, United States"@en-us .



Monday, May 16, 2011
Example Turtle
    @prefix space: <http://example.com/space-schema/> .
    @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

    <http://example.com/spacecraft/1969-059A>
      a space:Spacecraft ;
      space:name "Apollo 11 Command and Service Module" ;
      space:launched "1969-07-16"^^xsd:date ;
      space:mass 28801.0 ;
      space:launchsite <http://.../cape+cana...> .

    <http://.../cape+cana...>
      space:name "Cape Canaveral, United States"@en-us .




Monday, May 16, 2011
RDF/XML
Monday, May 16, 2011
Example Turtle
    @prefix space: <http://example.com/space-schema/> .
    @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

    <http://example.com/spacecraft/1969-059A>
      a space:Spacecraft ;
      space:name "Apollo 11 Command and Service Module" ;
      space:launched "1969-07-16"^^xsd:date ;
      space:mass 28801.0 ;
      space:launchsite <http://.../cape+cana...> .

    <http://.../cape+cana...>
      space:name "Cape Canaveral, United States"@en-us .




Monday, May 16, 2011
http://...   a           http://...
                       /1969-059A               /Spacecraft




      <?xml version="1.0" encoding="utf-8"?>
      <rdf:RDF
        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

           <rdf:Description rdf:about="http://.../1969-059A">
             <rdf:type rdf:resource="http://.../Spacecraft"/>
           </rdf:Description>

      </rdf:RDF>


Monday, May 16, 2011
http://...                                  launchsite      http://...
              /1969-059A                                                 /cape+cana...



                     name                                                     name
                             Apollo 11 Command and Service Module                        Cape Canaveral, United States




                launched
                                         16 July 1969




                 mass
                                           28801.0




                 a                http://...
                                /Spacecraft




Monday, May 16, 2011
Example RDF/XML
    <?xml version="1.0"?>
    <rdf:RDF
      xmlns:space="http://example.com/space-schema/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

      <rdf:Description rdf:about="http://example.com/spacecraft/1969-059A">
       <rdf:type
         rdf:resource="http://example.com/space-schema/Spacecraft">
       <space:name>
         Apollo 11 Command and Service Module
       </space:name>
       <space:launched rdf:datatype="http://www.w3.org/2001/XMLSchema#date">
         1969-07-16
       </space:launched>
       <space:mass rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">
         28801
       </space:mass>
       <space:launchsite
         rdf:resource="http://.../cape+cana..." />
      </rdf:Description>

      <rdf:Description rdf:about="http://.../cape+cana...">
       <space:name xml:lang="en-us">
         Cape Canaveral, United States
       </space:name>
      </rdf:Description>

    </rdf:RDF>



Monday, May 16, 2011
Example RDF/XML
    <?xml version="1.0"?>
    <rdf:RDF
      xmlns:space="http://example.com/space-schema/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

      <rdf:Description rdf:about="http://example.com/spacecraft/1969-059A">     subject   .
       <rdf:type                                                               property   .
         rdf:resource="http://example.com/space-schema/Spacecraft">               value   .
       <space:name>                                                            property   .
         Apollo 11 Command and Service Module                                     value   .
       </space:name>
       <space:launched rdf:datatype="http://www.w3.org/2001/XMLSchema#date">   property   .
         1969-07-16                                                               value   .
       </space:launched>
       <space:mass rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">    property   .
         28801                                                                    value   .
       </space:mass>
       <space:launchsite                                                       property   .
         rdf:resource="http://.../cape+cana..." />                                value   .
      </rdf:Description>

      <rdf:Description rdf:about="http://.../cape+cana...">                     subject   .
       <space:name xml:lang="en-us">                                           property   .
         Cape Canaveral, United States                                            value   .
       </space:name>
      </rdf:Description>

    </rdf:RDF>



Monday, May 16, 2011
Example RDF/XML
    <?xml version="1.0"?>
    <rdf:RDF
      xmlns:space="http://example.com/space-schema/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

      <rdf:Description rdf:about="http://example.com/spacecraft/1969-059A">
       <rdf:type
         rdf:resource="http://example.com/space-schema/Spacecraft">
       <space:name>
         Apollo 11 Command and Service Module
       </space:name>
       <space:launched rdf:datatype="http://www.w3.org/2001/XMLSchema#date">
         1969-07-16
       </space:launched>
       <space:mass rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">
         28801
       </space:mass>
       <space:launchsite
         rdf:resource="http://.../cape+cana..." />
      </rdf:Description>

      <rdf:Description rdf:about="http://.../cape+cana...">
       <space:name xml:lang="en-us">
         Cape Canaveral, United States
       </space:name>
      </rdf:Description>

    </rdf:RDF>



Monday, May 16, 2011
Example RDF/XML
    <?xml version="1.0"?>
    <rdf:RDF
      xmlns:space="http://example.com/space-schema/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

      <space:Spacecraft rdf:about="http://example.com/spacecraft/1969-059A">
       <rdf:type
         rdf:resource="http://example.com/space-schema/Spacecraft">
       <space:name>
         Apollo 11 Command and Service Module
       </space:name>
       <space:launched rdf:datatype="http://www.w3.org/2001/XMLSchema#date">
         1969-07-16
       </space:launched>
       <space:mass rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">
         28801
       </space:mass>
       <space:launchsite
         rdf:resource="http://.../cape+cana..." />
      </space:Spacecraft>

      <rdf:Description rdf:about="http://.../cape+cana...">
       <space:name xml:lang="en-us">
         Cape Canaveral, United States
       </space:name>
      </rdf:Description>

    </rdf:RDF>



Monday, May 16, 2011
Example RDF/XML
    <?xml version="1.0"?>
    <rdf:RDF
      xmlns:space="http://example.com/space-schema/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

      <space:Spacecraft rdf:about="http://example.com/spacecraft/1969-059A">


       <space:name>
         Apollo 11 Command and Service Module
       </space:name>
       <space:launched rdf:datatype="http://www.w3.org/2001/XMLSchema#date">
         1969-07-16
       </space:launched>
       <space:mass rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">
         28801
       </space:mass>
       <space:launchsite>
         <rdf:Description rdf:about="http://.../cape+cana...">
          <space:name xml:lang="en-us">
            Cape Canaveral, United States
          </space:name>
         </rdf:Description>
       </space:launchsite>
      </space:Spacecraft>

    </rdf:RDF>




Monday, May 16, 2011
Other RDF Formats
Monday, May 16, 2011
Writing RDF
                   • Turtle
                       Easily human readable, to become a W3C Recommendation
                       (standard)


                   • RDF/XML
                       Machine to Machine Transfer, W3C Recommendation (standard)


                   • N-Triples
                       One statement per line, subset of Turtle, grep compatible


                   • RDF/JSON
                       Useful for AJAX Applications and anything with else JSON support


                   • RDFa
                       Writing RDF within HTML pages



Monday, May 16, 2011
Example Turtle
    @prefix space: <http://example.com/space-schema/> .
    @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

    <http://example.com/spacecraft/1969-059A>
      a space:Spacecraft ;
      space:name "Apollo 11 Command and Service Module" ;
      space:launched "1969-07-16"^^xsd:date ;
      space:mass 28801.0 ;
      space:launchsite <http://.../cape+cana...> .

    <http://.../cape+cana...>
      space:name "Cape Canaveral, United States"@en-us .




Monday, May 16, 2011
Example N-Triples
    <http://example.com/spacecraft/1969-059A> <http://
    www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://
    example.com/space-schema/Spacecraft> .
    <http://example.com/spacecraft/1969-059A> <http://
    example.com/space-schema/name> "Apollo 11 Command and
    Service Module" .
    <http://example.com/spacecraft/1969-059A> <http://
    example.com/space-schema/launched>
    "1969-07-16"^^<http://www.w3.org/2001/XMLSchema#date> .
    <http://example.com/spacecraft/1969-059A> <http://
    example.com/space-schema/mass> "28801"^^<http://
    www.w3.org/2001/XMLSchema#integer> .
    <http://example.com/spacecraft/1969-059A> <http://
    example.com/space-schema/launchsite> <http://.../cape
    +cana...> .
    <http://.../cape+cana...> <http://example.com/space-
    schema/name> "Cape Canaveral, United States"@en-us .




Monday, May 16, 2011
Example N-Triples
    <http://example.com/spacecraft/1969-059A> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/space-schema/Spacecraft> .
    <http://example.com/spacecraft/1969-059A> <http://example.com/space-schema/name> "Apollo 11 Command and Service Module" .
    <http://example.com/spacecraft/1969-059A> <http://example.com/space-schema/launched> "1969-07-16"^^<http://www.w3.org/2001/XMLSchema#date> .
    <http://example.com/spacecraft/1969-059A> <http://example.com/space-schema/mass> "28801"^^<http://www.w3.org/2001/XMLSchema#integer> .
    <http://example.com/spacecraft/1969-059A> <http://example.com/space-schema/launchsite> <http://.../cape+cana...> .
    <http://.../cape+cana...> <http://example.com/space-schema/name> "Cape Canaveral, United States"@en-us .




Monday, May 16, 2011
Example RDF/JSON
    {
        "http://example.com/spacecraft/1969-059A" : {
           "http://example.com/space-schema/launched" : [ {
             "value" : "1969-07-16",
             "datatype" : "http://www.w3.org/2001/XMLSchema#date",
             "type" : "literal"
           } ],
           "http://example.com/space-schema/launchsite" : [ {
             "value" : "http://.../cape+cana...",
             "type" : "uri"
           } ],
           "http://example.com/space-schema/mass" : [ {
             "value" : "28801",
             "datatype" : "http://www.w3.org/2001/XMLSchema#integer",
             "type" : "literal"
           } ],
           "http://example.com/space-schema/name" : [ {
             "value" : "Apollo 11 Command and Service Module",
             "type" : "literal"
           } ],
           "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ {
             "value" : "http://example.com/space-schema/Spacecraft",
             "type" : "uri"
           } ]
        },
        "http://.../cape+cana..." : {
           "http://example.com/space-schema/name" : [ {
             "value" : "Cape Canaveral, United States",
             "lang" : "en-us",
             "type" : "literal"
           } ]
        }
    }




Monday, May 16, 2011
RDF Schema
Monday, May 16, 2011
Who has written a
                   schema before?


Monday, May 16, 2011
Step 1.
                       Forget what you
                       think you know
                        about schema

Monday, May 16, 2011
Differences
                   • In a relational database:
                    • the schema is external to the data
                    • the schema comes first
                    • you must know the schema to query
                   • In RDF:
                    • the schema is in the data
                    • you may query at any time

Monday, May 16, 2011
The Open World
                   • RDF Schema follow the Open World
                       assumption
                   • This model assumes that you may not
                       have all of the information — that more
                       things may be said elsewhere
                   • This means that missing isn't
                       necessarily broken
                   • RDF Schema are not used for
                       validation

Monday, May 16, 2011
If RDF Schema
                        aren't for
                    validation, then
                   what are they for?

Monday, May 16, 2011
RDF Validation
                   • The Web of Data is about modeling for
                       re-use
                   • Reusability is provided by modeling
                       outside of any one application's
                       context
                   • Validation is specific to an application's
                       context




Monday, May 16, 2011
RDF Schema
                   • RDF Schema are descriptive
                   • They add additional information to the
                       graph, through inference
                   • They add labels to properties and
                       classes that make dynamic interfaces
                       possible
                   • They provide human-readable
                       descriptions to support schema re-use
                   • RDF Schema are written as RDF
Monday, May 16, 2011
Important
                   • Properties are first class citizens
                       they're not hung off classes


                   • Classes are not OO classes
                       they do not have any behavior (methods)
                       or properties...




Monday, May 16, 2011
launchsite
                http://...                                                  http://...
              /1969-059A                                                 /cape+cana...



                     name                                                     name
                             Apollo 11 Command and Service Module                        Cape Canaveral, United States




                launched
                                         16 July 1969




                 mass
                                           28801.0




                 a                http://...
                                /Spacecraft




Monday, May 16, 2011
launchsite
                http://...                                                  http://...
              /1969-059A                                                 /cape+cana...



                     name                                                     name
                             Apollo 11 Command and Service Module                        Cape Canaveral, United States




                launched
                                         16 July 1969




                 mass
                                           28801.0




                 a                http://...
                                /Spacecraft




Monday, May 16, 2011
Schema Re-use
                   • RDF & RDFS
                       rdfs:label — labels for UI use


                   • Dublin Core
                       Bibliographic Metadata — title, creator


                   • FOAF
                       Friend of a Friend — people, organisations, creations, topics


                   • SIOC
                       Online communities — users, accounts, forums, blogs, microblogs


                   • Geo
                       Geographical locations — latitude, longitude


                   • SKOS
                       Existing taxonomies, thesauri and classification schemes




Monday, May 16, 2011
Schema Re-use
               Property               Schema
               name (on Spacecraft)

               launched

               mass

               launchsite

               name (on Launchsite)




Monday, May 16, 2011
FOAF




Monday, May 16, 2011
Schema Re-use
               Property               Schema
               name (on Spacecraft)   foaf:name

               launched               space:launched

               mass                   space:mass

               launchsite             space:launchsite

               name (on Launchsite)   foaf:name




Monday, May 16, 2011
RDF Schema
       @prefix         owl:    <http://www.w3.org/2002/07/owl#> .
       @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 space: <http://example.com/space-schema/> .

       space:launchsite a rdf:Property ;
         rdfs:label "Launch Site"@en ;
         rdfs:description "The site from which something was launched,
       examples would be the launch site of a spacecraft, rocket or
       ship"@en ;
         rdfs:isDefinedBy space: .

       space:mass a rdf:Property ;
         rdfs:label "Mass"@en ;
         rdfs:description "The mass of an object, measured in Kg" ;
         rdfs:isDefinedBy space: .




Monday, May 16, 2011
launchsite
                http://...                                                  http://...
              /1969-059A                                                 /cape+cana...



                     name                                                     name
                             Apollo 11 Command and Service Module                        Cape Canaveral, United States




                launched
                                         16 July 1969




                 mass
                                           28801.0




                 a                http://...
                                /Spacecraft




Monday, May 16, 2011
launchsite
                http://...                                                  http://...
              /1969-059A                                                 /cape+cana...



                     name                                                     name
                             Apollo 11 Command and Service Module                        Cape Canaveral, United States




                launched
                                         16 July 1969




                 mass
                                           28801.0




                 a                http://...
                                /Spacecraft




Monday, May 16, 2011
RDF Schema
     @prefix           owl:    <http://www.w3.org/2002/07/owl#> .
     @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 space: <http://example.com/space-schema/> .

     space:launchsite a rdf:Property ;
       rdfs:label "Launch Site"@en ;
       rdfs:description "The site from which something was launched,
     examples would be the launch site of a spacecraft, rocket or ship"@en ;
       rdfs:isDefinedBy space: .

     space:mass a rdf:Property ;
       rdfs:label "Mass"@en ;
       rdfs:description "The mass of an object, measured in Kg" ;
       rdfs:isDefinedBy space: .

     space:Spacecraft a rdfs:Class ;
       rdfs:label "Spacecraft"@en ;
       rdfs:description "A Spacecraft is any man-made object intentionally
     launched into space" ;
       rdfs:isDefinedBy space: .



Monday, May 16, 2011
Typing with Ranges and Domains

                   • Properties can add class information to
                       the subject and value either side of them
                   • A domain adds type information to the
                       subject
                   • A range adds type information to the
                       value
                   • Domains and ranges add type
                       information from the schema to the
                       instance data


Monday, May 16, 2011
A Launch Site is
                       any place where
                        something was
                          launched

Monday, May 16, 2011
RDF Schema
     @prefix           owl:    <http://www.w3.org/2002/07/owl#> .
     @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 space: <http://example.com/space-schema/> .

     space:launchsite a rdf:Property ;
       rdfs:label "Launch Site"@en ;
       rdfs:description "The site from which something was launched, examples
     would be the launch site of a spacecraft, rocket or ship"@en ;
       rdfs:range space:Launchsite ;
       rdfs:isDefinedBy space: .

     space:mass a rdf:Property ;
       rdfs:label "Mass"@en ;
       rdfs:description "The mass of an object, measured in Kg" ;
       rdfs:isDefinedBy space: .

     space:Spacecraft a rdfs:Class ;
       rdfs:label "Spacecraft"@en ;
       rdfs:description "A Spacecraft is any man-made object intentionally
     launched into space" ;
       rdfs:isDefinedBy space: .



Monday, May 16, 2011
http://...                  launchsite      http://...
              /1969-059A                                 /cape+cana...



                                                              name
                                                                         Cape Canaveral, United States




                 a             http://...
                             /Spacecraft




Monday, May 16, 2011
http://...                    launchsite      http://...
              /1969-059A                                   /cape+cana...


                                     Each
                                  property                      name

                                      is a
                                                                           Cape Canaveral, United States


                                 resource



                                              http://...
                                            /launchsite




                 a             http://...
                             /Spacecraft




Monday, May 16, 2011
http://...                    launchsite        http://...
              /1969-059A                                     /cape+cana...


                                     Each
                                  property                         name

                                      is a
                                                                             Cape Canaveral, United States


                                 resource



                                              http://...                       http://...
                                            /launchsite                      /Launchsite

                                                           range




                 a             http://...
                             /Spacecraft




Monday, May 16, 2011
http://...                    launchsite        http://...
              /1969-059A                                     /cape+cana...


                                     Each
                                  property                         name

                                      is a
                                                                             Cape Canaveral, United States


                                 resource



                                              http://...            a          http://...
                                            /launchsite                      /Launchsite

                                                           range




                 a             http://...
                             /Spacecraft




Monday, May 16, 2011
Property and Class Hierarchies

                   • Properties and classes can be more
                        specialised versions of others
                   • This is done through rdfs:subPropertyOf
                        and rdfs:subClassOf




Monday, May 16, 2011
LODE




Monday, May 16, 2011
RDF Schema
      @prefix          lode:   <http://linkedevents.org/ontology/> .
      @prefix          owl:    <http://www.w3.org/2002/07/owl#> .
      @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 space: <http://example.com/space-schema/> .

      space:launchsite a rdf:Property ;
        rdfs:label "Launch Site"@en ;
        rdfs:description "The site from which something was launched, examples would
      be the launch site of a spacecraft, rocket or ship"@en ;
        rdfs:range space:Launchsite ;
        rdfs:subPropertyOf lode:atPlace ;
        rdfs:isDefinedBy space: .

      space:mass a rdf:Property ;
        rdfs:label "Mass"@en ;
        rdfs:description "The mass of an object, measured in Kg" ;
        rdfs:isDefinedBy space: .

      space:Spacecraft a rdfs:Class ;
        rdfs:label "Spacecraft"@en ;
        rdfs:description "A Spacecraft is any man-made object intentionally launched
      into space" ;
        rdfs:isDefinedBy space: .



Monday, May 16, 2011
http://...                    launchsite        http://...
              /1969-059A                                     /cape+cana...



                                                                   name
                                                                             Cape Canaveral, United States




                                              http://...            a          http://...
                                            /launchsite                      /Launchsite

                                                           range




                 a             http://...
                             /Spacecraft




Monday, May 16, 2011
http://...                    launchsite            http://...
              /1969-059A                                         /cape+cana...



                                                                           name
                                                                                  Cape Canaveral, United States




                                              http://...                    a       http://...
                                            /launchsite                           /Launchsite

                                                              range




                 a             http://...                  subPropertyOf             http://...
                             /Spacecraft                                            /atPlace




Monday, May 16, 2011
atPlace



                http://...                    launchsite            http://...
              /1969-059A                                         /cape+cana...


                                     Each
                                  property                                 name

                                      is a
                                                                                  Cape Canaveral, United States


                                 resource



                                              http://...                    a       http://...
                                            /launchsite                           /Launchsite

                                                              range




                 a             http://...                  subPropertyOf             http://...
                             /Spacecraft                                            /atPlace




Monday, May 16, 2011
Naming Convention
                   • Properties are generally in camel-case
                       name; launchDate; launchVehicle; crewMember


                   • RDF Class names are usually in title
                       case
                       Person; Spacecraft; Discipline


                   • Properties use the simplest name they
                       can
                       launch; time; destination


                   • Inverse properties often use 'of'
                       name & nameOf; crewMember & crewMemberOf




Monday, May 16, 2011
Thanks to


               • Rob Styles, Talis Group Ltd for his CC-BY
                 licensed “Two Day Introduction to the Web of
                 Data” slides and spacecraft example data.




Monday, May 16, 2011
This work is Copyright © 2010 David Hyland-Wood
                       Based partially on CC-BY licensed content Copyright © 2010 Talis Systems Limited by Rob Styles.
                       It is licensed under the Creative Commons Attribution 3.0 Unported License.
                       Full details at: http://creativecommons.org/licenses/by/3.0/


                       You are free:

                                  to Share — to copy, distribute and transmit the work




                                  to Remix — to adapt the work




                       Under the following conditions:
                                  Attribution. You must attribute the work in the manner specified by the author or licensor (but
                                  not in any way that suggests that they endorse you or your use of the work).



                       •   For any reuse or distribution, you must make clear to others the license terms of this work.
                       •   Any of the above conditions can be waived if you get permission from the copyright holder.
                       •   Nothing in this license impairs or restricts the author's moral rights.
                       •   Some Content in the work may be licensed under different terms, this is noted separately.




Monday, May 16, 2011

More Related Content

More from David Wood

Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221David Wood
 
Privacy in the Smart City
Privacy in the Smart CityPrivacy in the Smart City
Privacy in the Smart CityDavid Wood
 
Controlling Complexities in Software Development
Controlling Complexities in Software DevelopmentControlling Complexities in Software Development
Controlling Complexities in Software DevelopmentDavid Wood
 
Privacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable ClaimsPrivacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable ClaimsDavid Wood
 
Implementing the Verifiable Claims data model
Implementing the Verifiable Claims data modelImplementing the Verifiable Claims data model
Implementing the Verifiable Claims data modelDavid Wood
 
So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301David Wood
 
Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601David Wood
 
When Metaphors Kill
When Metaphors KillWhen Metaphors Kill
When Metaphors KillDavid Wood
 
Secularism in Australia
Secularism in AustraliaSecularism in Australia
Secularism in AustraliaDavid Wood
 
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and PleonasmsMeditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and PleonasmsDavid Wood
 
Building a writer's platform with social media
Building a writer's platform with social mediaBuilding a writer's platform with social media
Building a writer's platform with social mediaDavid Wood
 
Summary of the Hero's Journey
Summary of the Hero's JourneySummary of the Hero's Journey
Summary of the Hero's JourneyDavid Wood
 
Open by Default
Open by DefaultOpen by Default
Open by DefaultDavid Wood
 
Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926David Wood
 
Linked Data ROI 20110426
Linked Data ROI 20110426Linked Data ROI 20110426
Linked Data ROI 20110426David Wood
 
Introduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesIntroduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesDavid Wood
 
Introduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesIntroduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesDavid Wood
 
Introduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesIntroduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesDavid Wood
 
Intro to Linked Data: SPARQL
Intro to Linked Data: SPARQLIntro to Linked Data: SPARQL
Intro to Linked Data: SPARQLDavid Wood
 
Intro to Linked Data: Context
Intro to Linked Data: ContextIntro to Linked Data: Context
Intro to Linked Data: ContextDavid Wood
 

More from David Wood (20)

Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
 
Privacy in the Smart City
Privacy in the Smart CityPrivacy in the Smart City
Privacy in the Smart City
 
Controlling Complexities in Software Development
Controlling Complexities in Software DevelopmentControlling Complexities in Software Development
Controlling Complexities in Software Development
 
Privacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable ClaimsPrivacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable Claims
 
Implementing the Verifiable Claims data model
Implementing the Verifiable Claims data modelImplementing the Verifiable Claims data model
Implementing the Verifiable Claims data model
 
So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301
 
Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601
 
When Metaphors Kill
When Metaphors KillWhen Metaphors Kill
When Metaphors Kill
 
Secularism in Australia
Secularism in AustraliaSecularism in Australia
Secularism in Australia
 
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and PleonasmsMeditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
 
Building a writer's platform with social media
Building a writer's platform with social mediaBuilding a writer's platform with social media
Building a writer's platform with social media
 
Summary of the Hero's Journey
Summary of the Hero's JourneySummary of the Hero's Journey
Summary of the Hero's Journey
 
Open by Default
Open by DefaultOpen by Default
Open by Default
 
Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926
 
Linked Data ROI 20110426
Linked Data ROI 20110426Linked Data ROI 20110426
Linked Data ROI 20110426
 
Introduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesIntroduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF Vocabularies
 
Introduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesIntroduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF Vocabularies
 
Introduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesIntroduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF Vocabularies
 
Intro to Linked Data: SPARQL
Intro to Linked Data: SPARQLIntro to Linked Data: SPARQL
Intro to Linked Data: SPARQL
 
Intro to Linked Data: Context
Intro to Linked Data: ContextIntro to Linked Data: Context
Intro to Linked Data: Context
 

Recently uploaded

ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 

Recently uploaded (20)

ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 

Intro to Linked Data: Data Modeling

  • 1. An Introduction to Linked Data Part 2 of 5 David Hyland-Wood Data Modeling University of Mary Washington Monday, May 16, 2011
  • 2. Data modeling without context Monday, May 16, 2011
  • 4. Modeling without Context • Model the Real World Monday, May 16, 2011
  • 5. Modeling without Context • Model the Real World • Look for objects of interest Monday, May 16, 2011
  • 6. Modeling without Context • Model the Real World • Look for objects of interest • Put aside the immediate needs of any application Monday, May 16, 2011
  • 7. Modeling without Context • Model the Real World • Look for objects of interest • Put aside the immediate needs of any application • Investigate how others are already modeling similar or related data Monday, May 16, 2011
  • 8. Modeling without Context • Model the Real World • Look for objects of interest • Put aside the immediate needs of any application • Investigate how others are already modeling similar or related data • These techniques allow for re-use and merging Monday, May 16, 2011
  • 10. Modeling without Context • Look for duplication (normalise) Monday, May 16, 2011
  • 11. Modeling without Context • Look for duplication (normalise) • Think about time and events, as well as things Monday, May 16, 2011
  • 12. Modeling without Context • Look for duplication (normalise) • Think about time and events, as well as things • Consider how the data will change over time Monday, May 16, 2011
  • 13. Modeling without Context • Look for duplication (normalise) • Think about time and events, as well as things • Consider how the data will change over time • Separate real-world (non-information resources) and online (information resources) Monday, May 16, 2011
  • 14. Objects of Interest Apollo 11 Command and crew Buzz Aldrin Service Module Monday, May 16, 2011
  • 15. Objects of Interest Apollo 11 Command and crew Buzz Buzz Aldrin Aldrin Service Module Monday, May 16, 2011
  • 16. Objects of Interest 20 January 1930 Person born a Apollo 11 Command and crew Buzz Buzz Aldrin Aldrin Service Module Monday, May 16, 2011
  • 17. Objects of Interest 20 January 1930 Person born a Apollo 11 Command and crew Buzz Aldrin Service Module name Buzz Aldrin Monday, May 16, 2011
  • 18. Apollo 11 Command and launchsite Cape Canaveral Service Module name name Apollo 11 Command and Service Module Cape Canaveral, United States launched 16 July 1969 mass 28801.0 a Spacecraft Monday, May 16, 2011
  • 19. URIs: Naming Things on the Web Monday, May 16, 2011
  • 20. Naming Things on the Web • Use http:// URIs There are other URIs, but http URIs can be used to get more information quickly and easily • Use clean, stable URIs Abstract away implementation details Ensure they are reliable • There are two types of resource, both require URIs Information Resources — Web pages, images, CSS files etc. Non-Information Resources — People, places, events, concepts etc. Monday, May 16, 2011
  • 21. Distinguishing Resources http://example.com/1969-059A ← Thing http://example.com/1969-059A.rdf ← RDF data http://example.com/1969-059A.html ← HTML page http://example.com/1969-059A ← Thing http://example.com/1969-059A/rdf ← RDF data http://example.com/1969-059A/html ← HTML page http://example.com/resource/1969-059A ← Thing http://example.com/data/1969-059A ← RDF data http://example.com/page/1969-059A ← HTML page Monday, May 16, 2011
  • 22. Use URIs http://.../topics/physics URIs provide names for resources You can say things about resources "Physics" Literal values are displayable labels You can't say more things about "Physics" Monday, May 16, 2011
  • 23. Use Your Own Domain http://yours.com/spacecraft/1959-059A I own the domain, so I can control the meaning of the URI I can also commit to its permanence and provide data at this address http://theirs.com/spacecraft/1959-059A I don't own this domain, so I can't put any data there The domain owner may choose to use this URI to mean something different to me Monday, May 16, 2011
  • 24. Use Neutral URIs http://.../spacecraft/1959-059A The URI contains meaningful, natural or system-neutral keys. I can route these URIs to any implementation, meaning they can live forever Bonus: I'm not advertising my technology choices http://.../index.aspx?id=3 Nobody wants to know that you're using ASP.Net, really How will you keep URIs the same when you change or upgrade your technology? Monday, May 16, 2011
  • 25. Use http:// URIs http://.../spacecraft/1969-059A everyone know what to do with http:// URIs http:// URIs provide a quick, easy and scalable lookup mechanism info:space/1969-059A http://info-uri.info info URIs require specialised knowledge info URIs provide no lookup mechanism Monday, May 16, 2011
  • 26. Use Natural Keys http://.../spacecraft/1969-059A Anyone working with the original data can 'guess' your URIs You can visually debug, and remember, your own URIs http://.../809c6e Nobody can guess this Monday, May 16, 2011
  • 27. Use Containers (sparingly) http://.../spacecraft/1969-059A Containers help keep natural keys separate Containers provide a natural place to put lists http://.../1969-059A What URI do I put a list of all the spacecraft at now? Monday, May 16, 2011
  • 28. Use Dates (sparingly) http://.../statistics/2010/agencies Dates provide a way to show data from a period in time Most useful for things like statistics, samples or readings http://.../statistics/agencies Where am I going to put next year's statistics? Monday, May 16, 2011
  • 29. Distinguishing Resources http://example.com/1969-059A.html#self ← Thing http://example.com/1969-059A.html ← HTML page Monday, May 16, 2011
  • 30. Fragment Identifiers # • Useful, with caution • Fragment identifiers are not sent to the server • Limits server-side decision making • Limits granularity of the response • Sometimes used with schema when terms link to human-readable documentation on the Web. Monday, May 16, 2011
  • 31. Turtle: Terse RDF Triple Language Monday, May 16, 2011
  • 32. Turtle • Terse Triple Language (TTL) http://www.w3.org/2007/02/turtle/primer/ • A human-readable notation for RDF • Provides useful syntax for quickly hand-writing RDF • Forms the basis of patterns in SPARQL Monday, May 16, 2011
  • 33. http://... a http://... /1969-059A /Spacecraft <http://.../1969-059A> a <http://.../Spacecraft> . Monday, May 16, 2011
  • 35. http://... /1969-059A <http://example.com/spacecraft/1969-059A> Monday, May 16, 2011
  • 36. http://... /1969-059A <http://example.com/spacecraft/1969-059A> a space:Spacecraft ; a http://... /Spacecraft Monday, May 16, 2011
  • 37. http://... /1969-059A name Apollo 11 Command and Service Module <http://example.com/spacecraft/1969-059A> a space:Spacecraft ; space:name "Apollo 11 Command and Service Module" ; a http://... /Spacecraft Monday, May 16, 2011
  • 38. http://... /1969-059A name Apollo 11 Command and Service Module launched 16 July 1969 <http://example.com/spacecraft/1969-059A> a space:Spacecraft ; space:name "Apollo 11 Command and Service Module" ; space:launched "1969-07-16"^^xsd:date ; a http://... /Spacecraft Monday, May 16, 2011
  • 39. http://... /1969-059A name Apollo 11 Command and Service Module launched 16 July 1969 <http://example.com/spacecraft/1969-059A> mass 28801.0 a space:Spacecraft ; space:name "Apollo 11 Command and Service Module" ; space:launched "1969-07-16"^^xsd:date ; space:mass 28801.0 . a http://... /Spacecraft Monday, May 16, 2011
  • 40. http://... /1969-059A name Apollo 11 Command and Service Module launched @prefix space: <http://example.com/space-schema/> . 16 July 1969 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <http://example.com/spacecraft/1969-059A> mass 28801.0 a space:Spacecraft ; space:name "Apollo 11 Command and Service Module" ; space:launched "1969-07-16"^^xsd:date ; space:mass 28801.0 . a http://... /Spacecraft Monday, May 16, 2011
  • 41. Example Turtle @prefix space: <http://example.com/space-schema/> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <http://example.com/spacecraft/1969-059A> a space:Spacecraft ; space:name "Apollo 11 Command and Service Module" ; space:launched "1969-07-16"^^xsd:date ; space:mass 28801.0 . Monday, May 16, 2011
  • 42. http://... /1969-059A name Apollo 11 Command and Service Module launched @prefix space: <http://example.com/space-schema/> . 16 July 1969 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <http://example.com/spacecraft/1969-059A> mass 28801.0 a space:Spacecraft ; space:name "Apollo 11 Command and Service Module" ; space:launched "1969-07-16"^^xsd:date ; space:mass 28801.0 . a http://... /Spacecraft Monday, May 16, 2011
  • 43. http://... launchsite http://... /1969-059A /cape+cana... name name Apollo 11 Command and Service Module Cape Canaveral, United States launched @prefix space: <http://example.com/space-schema/> . 16 July 1969 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <http://example.com/spacecraft/1969-059A> mass 28801.0 a space:Spacecraft ; space:name "Apollo 11 Command and Service Module" ; space:launched "1969-07-16"^^xsd:date ; space:mass 28801.0 . a http://... /Spacecraft Monday, May 16, 2011
  • 44. http://... launchsite http://... /1969-059A /cape+cana... name name Apollo 11 Command and Service Module Cape Canaveral, United States launched @prefix space: <http://example.com/space-schema/> . 16 July 1969 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <http://example.com/spacecraft/1969-059A> mass 28801.0 a space:Spacecraft ; space:name "Apollo 11 Command and Service Module" ; space:launched "1969-07-16"^^xsd:date ; space:mass 28801.0 . ; a http://... space:launchsite <http://.../cape+cana...> . /Spacecraft Monday, May 16, 2011
  • 45. http://... launchsite http://... /1969-059A /cape+cana... name name Apollo 11 Command and Service Module Cape Canaveral, United States launched @prefix space: <http://example.com/space-schema/> . 16 July 1969 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <http://example.com/spacecraft/1969-059A> mass 28801.0 a space:Spacecraft ; space:name "Apollo 11 Command and Service Module" ; space:launched "1969-07-16"^^xsd:date ; space:mass 28801.0 . ; a http://... space:launchsite <http://.../cape+cana...> . /Spacecraft <http://.../cape+cana...> space:name "Cape Canaveral, United States"@en-us . Monday, May 16, 2011
  • 46. Example Turtle @prefix space: <http://example.com/space-schema/> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <http://example.com/spacecraft/1969-059A> a space:Spacecraft ; space:name "Apollo 11 Command and Service Module" ; space:launched "1969-07-16"^^xsd:date ; space:mass 28801.0 ; space:launchsite <http://.../cape+cana...> . <http://.../cape+cana...> space:name "Cape Canaveral, United States"@en-us . Monday, May 16, 2011
  • 48. Example Turtle @prefix space: <http://example.com/space-schema/> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <http://example.com/spacecraft/1969-059A> a space:Spacecraft ; space:name "Apollo 11 Command and Service Module" ; space:launched "1969-07-16"^^xsd:date ; space:mass 28801.0 ; space:launchsite <http://.../cape+cana...> . <http://.../cape+cana...> space:name "Cape Canaveral, United States"@en-us . Monday, May 16, 2011
  • 49. http://... a http://... /1969-059A /Spacecraft <?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://.../1969-059A"> <rdf:type rdf:resource="http://.../Spacecraft"/> </rdf:Description> </rdf:RDF> Monday, May 16, 2011
  • 50. http://... launchsite http://... /1969-059A /cape+cana... name name Apollo 11 Command and Service Module Cape Canaveral, United States launched 16 July 1969 mass 28801.0 a http://... /Spacecraft Monday, May 16, 2011
  • 51. Example RDF/XML <?xml version="1.0"?> <rdf:RDF xmlns:space="http://example.com/space-schema/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://example.com/spacecraft/1969-059A"> <rdf:type rdf:resource="http://example.com/space-schema/Spacecraft"> <space:name> Apollo 11 Command and Service Module </space:name> <space:launched rdf:datatype="http://www.w3.org/2001/XMLSchema#date"> 1969-07-16 </space:launched> <space:mass rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"> 28801 </space:mass> <space:launchsite rdf:resource="http://.../cape+cana..." /> </rdf:Description> <rdf:Description rdf:about="http://.../cape+cana..."> <space:name xml:lang="en-us"> Cape Canaveral, United States </space:name> </rdf:Description> </rdf:RDF> Monday, May 16, 2011
  • 52. Example RDF/XML <?xml version="1.0"?> <rdf:RDF xmlns:space="http://example.com/space-schema/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://example.com/spacecraft/1969-059A"> subject . <rdf:type property . rdf:resource="http://example.com/space-schema/Spacecraft"> value . <space:name> property . Apollo 11 Command and Service Module value . </space:name> <space:launched rdf:datatype="http://www.w3.org/2001/XMLSchema#date"> property . 1969-07-16 value . </space:launched> <space:mass rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"> property . 28801 value . </space:mass> <space:launchsite property . rdf:resource="http://.../cape+cana..." /> value . </rdf:Description> <rdf:Description rdf:about="http://.../cape+cana..."> subject . <space:name xml:lang="en-us"> property . Cape Canaveral, United States value . </space:name> </rdf:Description> </rdf:RDF> Monday, May 16, 2011
  • 53. Example RDF/XML <?xml version="1.0"?> <rdf:RDF xmlns:space="http://example.com/space-schema/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://example.com/spacecraft/1969-059A"> <rdf:type rdf:resource="http://example.com/space-schema/Spacecraft"> <space:name> Apollo 11 Command and Service Module </space:name> <space:launched rdf:datatype="http://www.w3.org/2001/XMLSchema#date"> 1969-07-16 </space:launched> <space:mass rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"> 28801 </space:mass> <space:launchsite rdf:resource="http://.../cape+cana..." /> </rdf:Description> <rdf:Description rdf:about="http://.../cape+cana..."> <space:name xml:lang="en-us"> Cape Canaveral, United States </space:name> </rdf:Description> </rdf:RDF> Monday, May 16, 2011
  • 54. Example RDF/XML <?xml version="1.0"?> <rdf:RDF xmlns:space="http://example.com/space-schema/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <space:Spacecraft rdf:about="http://example.com/spacecraft/1969-059A"> <rdf:type rdf:resource="http://example.com/space-schema/Spacecraft"> <space:name> Apollo 11 Command and Service Module </space:name> <space:launched rdf:datatype="http://www.w3.org/2001/XMLSchema#date"> 1969-07-16 </space:launched> <space:mass rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"> 28801 </space:mass> <space:launchsite rdf:resource="http://.../cape+cana..." /> </space:Spacecraft> <rdf:Description rdf:about="http://.../cape+cana..."> <space:name xml:lang="en-us"> Cape Canaveral, United States </space:name> </rdf:Description> </rdf:RDF> Monday, May 16, 2011
  • 55. Example RDF/XML <?xml version="1.0"?> <rdf:RDF xmlns:space="http://example.com/space-schema/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <space:Spacecraft rdf:about="http://example.com/spacecraft/1969-059A"> <space:name> Apollo 11 Command and Service Module </space:name> <space:launched rdf:datatype="http://www.w3.org/2001/XMLSchema#date"> 1969-07-16 </space:launched> <space:mass rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"> 28801 </space:mass> <space:launchsite> <rdf:Description rdf:about="http://.../cape+cana..."> <space:name xml:lang="en-us"> Cape Canaveral, United States </space:name> </rdf:Description> </space:launchsite> </space:Spacecraft> </rdf:RDF> Monday, May 16, 2011
  • 57. Writing RDF • Turtle Easily human readable, to become a W3C Recommendation (standard) • RDF/XML Machine to Machine Transfer, W3C Recommendation (standard) • N-Triples One statement per line, subset of Turtle, grep compatible • RDF/JSON Useful for AJAX Applications and anything with else JSON support • RDFa Writing RDF within HTML pages Monday, May 16, 2011
  • 58. Example Turtle @prefix space: <http://example.com/space-schema/> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <http://example.com/spacecraft/1969-059A> a space:Spacecraft ; space:name "Apollo 11 Command and Service Module" ; space:launched "1969-07-16"^^xsd:date ; space:mass 28801.0 ; space:launchsite <http://.../cape+cana...> . <http://.../cape+cana...> space:name "Cape Canaveral, United States"@en-us . Monday, May 16, 2011
  • 59. Example N-Triples <http://example.com/spacecraft/1969-059A> <http:// www.w3.org/1999/02/22-rdf-syntax-ns#type> <http:// example.com/space-schema/Spacecraft> . <http://example.com/spacecraft/1969-059A> <http:// example.com/space-schema/name> "Apollo 11 Command and Service Module" . <http://example.com/spacecraft/1969-059A> <http:// example.com/space-schema/launched> "1969-07-16"^^<http://www.w3.org/2001/XMLSchema#date> . <http://example.com/spacecraft/1969-059A> <http:// example.com/space-schema/mass> "28801"^^<http:// www.w3.org/2001/XMLSchema#integer> . <http://example.com/spacecraft/1969-059A> <http:// example.com/space-schema/launchsite> <http://.../cape +cana...> . <http://.../cape+cana...> <http://example.com/space- schema/name> "Cape Canaveral, United States"@en-us . Monday, May 16, 2011
  • 60. Example N-Triples <http://example.com/spacecraft/1969-059A> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/space-schema/Spacecraft> . <http://example.com/spacecraft/1969-059A> <http://example.com/space-schema/name> "Apollo 11 Command and Service Module" . <http://example.com/spacecraft/1969-059A> <http://example.com/space-schema/launched> "1969-07-16"^^<http://www.w3.org/2001/XMLSchema#date> . <http://example.com/spacecraft/1969-059A> <http://example.com/space-schema/mass> "28801"^^<http://www.w3.org/2001/XMLSchema#integer> . <http://example.com/spacecraft/1969-059A> <http://example.com/space-schema/launchsite> <http://.../cape+cana...> . <http://.../cape+cana...> <http://example.com/space-schema/name> "Cape Canaveral, United States"@en-us . Monday, May 16, 2011
  • 61. Example RDF/JSON { "http://example.com/spacecraft/1969-059A" : { "http://example.com/space-schema/launched" : [ { "value" : "1969-07-16", "datatype" : "http://www.w3.org/2001/XMLSchema#date", "type" : "literal" } ], "http://example.com/space-schema/launchsite" : [ { "value" : "http://.../cape+cana...", "type" : "uri" } ], "http://example.com/space-schema/mass" : [ { "value" : "28801", "datatype" : "http://www.w3.org/2001/XMLSchema#integer", "type" : "literal" } ], "http://example.com/space-schema/name" : [ { "value" : "Apollo 11 Command and Service Module", "type" : "literal" } ], "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ { "value" : "http://example.com/space-schema/Spacecraft", "type" : "uri" } ] }, "http://.../cape+cana..." : { "http://example.com/space-schema/name" : [ { "value" : "Cape Canaveral, United States", "lang" : "en-us", "type" : "literal" } ] } } Monday, May 16, 2011
  • 63. Who has written a schema before? Monday, May 16, 2011
  • 64. Step 1. Forget what you think you know about schema Monday, May 16, 2011
  • 65. Differences • In a relational database: • the schema is external to the data • the schema comes first • you must know the schema to query • In RDF: • the schema is in the data • you may query at any time Monday, May 16, 2011
  • 66. The Open World • RDF Schema follow the Open World assumption • This model assumes that you may not have all of the information — that more things may be said elsewhere • This means that missing isn't necessarily broken • RDF Schema are not used for validation Monday, May 16, 2011
  • 67. If RDF Schema aren't for validation, then what are they for? Monday, May 16, 2011
  • 68. RDF Validation • The Web of Data is about modeling for re-use • Reusability is provided by modeling outside of any one application's context • Validation is specific to an application's context Monday, May 16, 2011
  • 69. RDF Schema • RDF Schema are descriptive • They add additional information to the graph, through inference • They add labels to properties and classes that make dynamic interfaces possible • They provide human-readable descriptions to support schema re-use • RDF Schema are written as RDF Monday, May 16, 2011
  • 70. Important • Properties are first class citizens they're not hung off classes • Classes are not OO classes they do not have any behavior (methods) or properties... Monday, May 16, 2011
  • 71. launchsite http://... http://... /1969-059A /cape+cana... name name Apollo 11 Command and Service Module Cape Canaveral, United States launched 16 July 1969 mass 28801.0 a http://... /Spacecraft Monday, May 16, 2011
  • 72. launchsite http://... http://... /1969-059A /cape+cana... name name Apollo 11 Command and Service Module Cape Canaveral, United States launched 16 July 1969 mass 28801.0 a http://... /Spacecraft Monday, May 16, 2011
  • 73. Schema Re-use • RDF & RDFS rdfs:label — labels for UI use • Dublin Core Bibliographic Metadata — title, creator • FOAF Friend of a Friend — people, organisations, creations, topics • SIOC Online communities — users, accounts, forums, blogs, microblogs • Geo Geographical locations — latitude, longitude • SKOS Existing taxonomies, thesauri and classification schemes Monday, May 16, 2011
  • 74. Schema Re-use Property Schema name (on Spacecraft) launched mass launchsite name (on Launchsite) Monday, May 16, 2011
  • 76. Schema Re-use Property Schema name (on Spacecraft) foaf:name launched space:launched mass space:mass launchsite space:launchsite name (on Launchsite) foaf:name Monday, May 16, 2011
  • 77. RDF Schema @prefix owl: <http://www.w3.org/2002/07/owl#> . @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 space: <http://example.com/space-schema/> . space:launchsite a rdf:Property ; rdfs:label "Launch Site"@en ; rdfs:description "The site from which something was launched, examples would be the launch site of a spacecraft, rocket or ship"@en ; rdfs:isDefinedBy space: . space:mass a rdf:Property ; rdfs:label "Mass"@en ; rdfs:description "The mass of an object, measured in Kg" ; rdfs:isDefinedBy space: . Monday, May 16, 2011
  • 78. launchsite http://... http://... /1969-059A /cape+cana... name name Apollo 11 Command and Service Module Cape Canaveral, United States launched 16 July 1969 mass 28801.0 a http://... /Spacecraft Monday, May 16, 2011
  • 79. launchsite http://... http://... /1969-059A /cape+cana... name name Apollo 11 Command and Service Module Cape Canaveral, United States launched 16 July 1969 mass 28801.0 a http://... /Spacecraft Monday, May 16, 2011
  • 80. RDF Schema @prefix owl: <http://www.w3.org/2002/07/owl#> . @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 space: <http://example.com/space-schema/> . space:launchsite a rdf:Property ; rdfs:label "Launch Site"@en ; rdfs:description "The site from which something was launched, examples would be the launch site of a spacecraft, rocket or ship"@en ; rdfs:isDefinedBy space: . space:mass a rdf:Property ; rdfs:label "Mass"@en ; rdfs:description "The mass of an object, measured in Kg" ; rdfs:isDefinedBy space: . space:Spacecraft a rdfs:Class ; rdfs:label "Spacecraft"@en ; rdfs:description "A Spacecraft is any man-made object intentionally launched into space" ; rdfs:isDefinedBy space: . Monday, May 16, 2011
  • 81. Typing with Ranges and Domains • Properties can add class information to the subject and value either side of them • A domain adds type information to the subject • A range adds type information to the value • Domains and ranges add type information from the schema to the instance data Monday, May 16, 2011
  • 82. A Launch Site is any place where something was launched Monday, May 16, 2011
  • 83. RDF Schema @prefix owl: <http://www.w3.org/2002/07/owl#> . @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 space: <http://example.com/space-schema/> . space:launchsite a rdf:Property ; rdfs:label "Launch Site"@en ; rdfs:description "The site from which something was launched, examples would be the launch site of a spacecraft, rocket or ship"@en ; rdfs:range space:Launchsite ; rdfs:isDefinedBy space: . space:mass a rdf:Property ; rdfs:label "Mass"@en ; rdfs:description "The mass of an object, measured in Kg" ; rdfs:isDefinedBy space: . space:Spacecraft a rdfs:Class ; rdfs:label "Spacecraft"@en ; rdfs:description "A Spacecraft is any man-made object intentionally launched into space" ; rdfs:isDefinedBy space: . Monday, May 16, 2011
  • 84. http://... launchsite http://... /1969-059A /cape+cana... name Cape Canaveral, United States a http://... /Spacecraft Monday, May 16, 2011
  • 85. http://... launchsite http://... /1969-059A /cape+cana... Each property name is a Cape Canaveral, United States resource http://... /launchsite a http://... /Spacecraft Monday, May 16, 2011
  • 86. http://... launchsite http://... /1969-059A /cape+cana... Each property name is a Cape Canaveral, United States resource http://... http://... /launchsite /Launchsite range a http://... /Spacecraft Monday, May 16, 2011
  • 87. http://... launchsite http://... /1969-059A /cape+cana... Each property name is a Cape Canaveral, United States resource http://... a http://... /launchsite /Launchsite range a http://... /Spacecraft Monday, May 16, 2011
  • 88. Property and Class Hierarchies • Properties and classes can be more specialised versions of others • This is done through rdfs:subPropertyOf and rdfs:subClassOf Monday, May 16, 2011
  • 90. RDF Schema @prefix lode: <http://linkedevents.org/ontology/> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @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 space: <http://example.com/space-schema/> . space:launchsite a rdf:Property ; rdfs:label "Launch Site"@en ; rdfs:description "The site from which something was launched, examples would be the launch site of a spacecraft, rocket or ship"@en ; rdfs:range space:Launchsite ; rdfs:subPropertyOf lode:atPlace ; rdfs:isDefinedBy space: . space:mass a rdf:Property ; rdfs:label "Mass"@en ; rdfs:description "The mass of an object, measured in Kg" ; rdfs:isDefinedBy space: . space:Spacecraft a rdfs:Class ; rdfs:label "Spacecraft"@en ; rdfs:description "A Spacecraft is any man-made object intentionally launched into space" ; rdfs:isDefinedBy space: . Monday, May 16, 2011
  • 91. http://... launchsite http://... /1969-059A /cape+cana... name Cape Canaveral, United States http://... a http://... /launchsite /Launchsite range a http://... /Spacecraft Monday, May 16, 2011
  • 92. http://... launchsite http://... /1969-059A /cape+cana... name Cape Canaveral, United States http://... a http://... /launchsite /Launchsite range a http://... subPropertyOf http://... /Spacecraft /atPlace Monday, May 16, 2011
  • 93. atPlace http://... launchsite http://... /1969-059A /cape+cana... Each property name is a Cape Canaveral, United States resource http://... a http://... /launchsite /Launchsite range a http://... subPropertyOf http://... /Spacecraft /atPlace Monday, May 16, 2011
  • 94. Naming Convention • Properties are generally in camel-case name; launchDate; launchVehicle; crewMember • RDF Class names are usually in title case Person; Spacecraft; Discipline • Properties use the simplest name they can launch; time; destination • Inverse properties often use 'of' name & nameOf; crewMember & crewMemberOf Monday, May 16, 2011
  • 95. Thanks to • Rob Styles, Talis Group Ltd for his CC-BY licensed “Two Day Introduction to the Web of Data” slides and spacecraft example data. Monday, May 16, 2011
  • 96. This work is Copyright © 2010 David Hyland-Wood Based partially on CC-BY licensed content Copyright © 2010 Talis Systems Limited by Rob Styles. It is licensed under the Creative Commons Attribution 3.0 Unported License. Full details at: http://creativecommons.org/licenses/by/3.0/ You are free: to Share — to copy, distribute and transmit the work to Remix — to adapt the work Under the following conditions: Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). • For any reuse or distribution, you must make clear to others the license terms of this work. • Any of the above conditions can be waived if you get permission from the copyright holder. • Nothing in this license impairs or restricts the author's moral rights. • Some Content in the work may be licensed under different terms, this is noted separately. Monday, May 16, 2011