🦲
mind
  • cleber's mind
  • plans
    • fact checking
    • personal assistant
  • self-management
    • agenda and tasks
    • mails and emails
  • knowledge
    • career
    • programming
      • Big O Notation
      • browsing data
      • C/C++
      • databases
      • eclipse
      • gradle
      • java
        • apache camel
      • javascript
      • naming convention
      • mysql
      • prolog
      • regex
      • REST
      • ssl/tls
      • version control
        • git commands
      • web-semantics
      • wot
    • research
      • mas
      • planning
      • math
        • probability
      • machine learning
      • nlp
      • speech recognition
      • data sources
      • data visualisation
    • it
      • asterisk
      • containers
        • installing docker
        • deploying busybox
        • deploying a sample
        • deploying node-red
        • deploying from the hub
      • clusters
        • installing kubernetes
        • deploying bootcamp
        • deploying nginx
        • deploying jacamo-rest
        • grafana
      • deploy
        • heroku
      • linux
        • tmux
        • vim
        • startup
      • networks
      • pdf
        • ssh
    • productivity
    • language
      • expressions
        • nice signposts
        • linking expressions
      • latex
      • scientific
      • writing
    • sailing
    • financial
      • assets
    • emergency
    • out of boxes
  • teaching
    • eletrônica digital
      • Conversão decimal para binário
      • Conversão binário para decimal
      • Sinais analógicos vs digitais
    • programação I
    • cabeamento estruturado
  • moments
    • insightful ai facts
    • ai4industry-hackathon
    • previous activities
  • brasil
  • external links
    • personal webpage
    • my github
Powered by GitBook
On this page
  • A database to play
  • Retrieving all the that of the DB
  • Another database to play
  • Retrieving all the that of the DB
  • Tools
  • Sources

Was this helpful?

  1. knowledge
  2. programming

web-semantics

Knowledge-Graphs, SPARQL

A database to play

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
<LarryPage>  
  <name> "Lawrence Edward Page"^^xsd:string ;
  <numberOfChildren> 2 ;
  <height> 1.7 ;
  <birthdate> "1973-03-26"^^xsd:date ;
  <wikipediaPage> "https://en.wikipedia.org/wiki/Larry_Page"^^xsd:anyURI ;
  <wealthInDollars> "107.9e9"^^xsd:double 

Retrieving all the that of the DB

PREFIX : <http://example.org/#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
SELECT * WHERE { ?s ?p ?o } LIMIT 10

Another database to play

PREFIX : <http://example.org/#>
:myProductionSystem a :System ; 
  :hasSubSystem :roboticArm1 , :conveyorBelt2 . 
:roboticArm1 a :System , :RoboticArm ; 
  :hasManufacturer :ABB . 
:conveyorBelt2 a :System ; 
  :hasSpeed "0.1" .

Retrieving all the that of the DB

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
SELECT * WHERE {?s ?p ?o} LIMIT 10

Retrieving all the Systems (which is all the data of this DB)

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT * WHERE {?s a :System} LIMIT 10

Retrieving the objects that have subsystems

PREFIX : <http://example.org/#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT * WHERE { ?System :hasSubSystem ?SS } LIMIT 10

Retrieving objects that have subsystems and its subsystem hasSpeed 0.1

PREFIX : <http://example.org/#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
SELECT * WHERE { ?s :hasSubSystem ?SS. ?SS :hasSpeed "0.1". } LIMIT 10

Tools

Sources

Previousgit commandsNextwot

Last updated 1 year ago

Was this helpful?

extension for Firefox

by Universidad de Chile

RDF Browser
RDF Playground
ai4industry Summer School - KG introductory exercises - EMSE
ai4industry Summer School - hackathon