Transforming Your Data with
GraphDB: GraphDB Fundamentals
Live Webinar,
January 2018
Outline
o RDF and RDFS
o SPARQL Overview
o Ontology Overview
o GraphDB Overview
o GraphDB Workbench Demo
o Q&A
RDF
What? Resource Description Framework (RDF) is graph
data model that
o Formally describes the semantics, or meaning of information
o Represents metadata, I.e data about data
How? RDF data model consists of triples
o That represents links (or edges) on an RDF graph
o Where the structure of each triples is Subject, Predicate, Object
Example triples:
obr:fred br:hasSpouse br:Wilma.
obr:fred br:hasAge 25.
Where: br refers to the namespace <http://bedrock> so that br:Fred expands to
<http://bedrock/Fred> as a Universal Resource Identifier (URI)
RDF Use Cases
o Internal or public platform for data and meta-data publishing
o Use case: A big media or scientific publisher needs to expose all internal information assets classified
according multiple taxonomies;
o Content enrichment and retrieval based on deep data
o Use case: A big enterprise organization has tons of knowledge locked into textual documents
describing events and entities with complex contextual information
o Integration of deep and diverse data
o Use case: A big enterprise with a complex knowledge driven business needs to integrate information
from multiple data sources
Sample
RDF data
RDFS
o What? RDF schema (RDFS)
o Adds concepts such as Resource, Literal, Class and Datatype
o Represents metadata, i.e data about data. Adds relationships such as subClassOf, subPropertyOf,
domain and range
o Provides the means to Define
o Classes and properties
o Hierarchies of classes and properties
Includes rules to infer new statements
Apply RDFS to Infer New Triples
Outline
o RDF and RDFS
o SPARQL Overview
o Ontology Overview
o GraphDB Overview
o GraphDB Workbench Demo
o Q&A
o SPARQL is a SQL-like query language for
RDF graph data with the following query types:
o SELECT returns tabular results
o CONSTRUCT creates a new RDF graph based on query results
o ASK returns ‘yes’ if the query has a solution, otherwise ‘no’
o DESCRIBE returns RDF graph data about a resource; useful when the query client
does not know the structure of the RDF data in the data source
o INSERT inserts triples into a graph
o DELETE deletes triples from a graph.
What is SPARQL?
Using SPARQL to Insert Triples
o To create an RDF graph, perform these steps:
o Define prefixes to URIs with the PREFIX keyword
o Use INSERT DATA to signify you want to insert statements. Write the subject-predicate-object
statements (triples).
o Execute this query.
PREFIX br: <http://bedrock/>
INSERT DATA {
br:fred br:hasSpouse br:wilma .
br:fred br:hasChild br:pebbles .
br:wilma br:hasChild br:pebbles .
br:pebbles br:hasSpouse br:bamm-bamm ;
br:hasChild br:roxy, br:chip .
}
Using SPARQL to Select Triples
o To access the RDF graph you just created, perform these steps:
o Define prefixes to URIs with the PREFIX keyword.
o Use SELECT to signify you want to select certain information, and WHERE to signify your conditions,
restrictions and filters.
o Execute this query.
PREFIX br: <http://bedrock/>
SELECT ?subject ?predicate ?object
WHERE {?subject ?predicate ?object}
Subject Predicate Object
br:fred br:hasChild br:pebbles
br:pebbles br:hasChild br:roxy
br:pebbles br:hasChild br:chip
br:wilma br:hasChild br:pebbles
PREFIX br: <http://bedrock/>
SELECT ?subject ?predicate ?object
WHERE {?subject ?predicate ?object}
Subject Predicate Object
br:fred br:hasChild br:pebbles
br:pebbles br:hasChild br:roxy
br:pebbles br:hasChild br:chip
br:wilma br:hasChild br:pebbles
Using SPARQL to Find Fred’s Grandchildren
o To find Fred’s grandchildren, first find out if Fred has any grandchildren:
o Define prefixes to URIs with the PREFIX keyword
o Use ASK to discover whether Fred has a grandchild, and WHERE to signify your conditions.
YES
Using SPARQL to Find Fred’s Grandchildren
Now that we know he has at least one grandchild, perform these steps to
find the grandchild(ren):
oDefine prefixes to URIs with the PREFIX keyword
oUse SELECT to signify you want to select a grandchild, and WHERE to signify your conditions.
PREFIX br: <http://bedrock/>
SELECT ?grandChild
WHERE {
br:fred br:hasChild ?child .
?child br:hasChild ?grandChild .
}
grandChild
1. br:roxy
2. br:chip
PREFIX br: <http://bedrock/>
SELECT ?grandChild
WHERE {
br:fred br:hasChild ?child .
?child br:hasChild ?grandChild .
}
grandChild
1. br:roxy
2. br:chip
Outline
o RDF and RDFS
o SPARQL Overview
o Ontology Overview
o GraphDB Overview
o GraphDB Workbench Demo
o Q&A
What is Ontology
An ontology is a formal specification that provides sharable and
reusable knowledge representation.
Examples of formal specifications include:
oTaxonomies
oVocabularies
oThesauri
oTopic Maps
oLogical Models
What is in an Ontology?
An ontology specification includes descriptions of
oConcepts and properties in a domain
oRelationships between concepts
oConstraints on how the relationships can be used
oIndividuals as members of concepts
The Benefits of an Ontology
Ontologies provide:
oA common understanding of information
oExplicit domain assumptions
These provisions are valuable because ontologies:
oSupport data integration for analytics
oApply domain knowledge to data
oSupport interoperation of applications
oEnable model-driven applications
oReduce the time and cost of application development
oImprove data quality, i.e., metadata and provenance
Outline
o RDF and RDFS
o SPARQL Overview
o Ontology Overview
o GraphDB Overview
o GraphDB Workbench Demo
o Q&A
What is GraphDB?
Enterprise ready Semantic Graph Database,
compliant with W3C Standards
GraphDB™ Editions
o GraphDB™ Free
o GraphDB™ Standard
o GraphDB™ Cloud
o GraphDB™ Enterprise
#21
Outline
o RDF and RDFS
o SPARQL Overview
o Ontology Overview
o GraphDB Overview
o GraphDB Workbench Demo
o Q&A
DEMO
DEMO
Install GraphDB
Load Data
oUsing GraphDB Workbench import page
oUsing OntoRefine
Query Data
oSPARQL Ask
oSPARQL Select
oSPARQL Construct
Query Monitoring
DEMO
o Search DATA
o GraphDB Workbench Autocomplete
o GraphDB Connectors – Lucene, Solr,
o ElasticSearch
o Visualize DATA
o Visualize Class Hierarchy
o GraphDB Default Visual Graph
o GraphDB Custom Visual Graphs
Support and FAQ’s
graphDB-support@ontotext.com
Additional resources:
Ontotext:
Community Forum and Evaluation Support: http://stackoverflow.com/questions/tagged/graphdb
GraphDB Website and Documentation: http://graphdb.ontotext.com
Whitepapers, Fundamentals: http://ontotext.com/knowledge-hub/fundamentals/
SPARQL, OWL, and RDF:
RDF: http://www.w3.org/TR/rdf11-concepts/
RDFS: http://www.w3.org/TR/rdf-schema/
SPARQL Overview: http://www.w3.org/TR/sparql11-overview/
SPARQL Query: http://www.w3.org/TR/sparql11-query/
SPARQL Update: http://www.w3.org/TR/sparql11-update
Desislava Hristova, Senior Software Engineer
Get your GraphDB Today:
http://ontotext.com/products/graphdb/
FactForge: Hub for open data and news about People and Organizations
http://factforge.net/
Experience the technology with NOW: Semantic News Portal
http://now.ontotext.com
Thank you
for your attention!

Transforming Your Data with GraphDB: GraphDB Fundamentals, Jan 2018

  • 1.
    Transforming Your Datawith GraphDB: GraphDB Fundamentals Live Webinar, January 2018
  • 3.
    Outline o RDF andRDFS o SPARQL Overview o Ontology Overview o GraphDB Overview o GraphDB Workbench Demo o Q&A
  • 4.
    RDF What? Resource DescriptionFramework (RDF) is graph data model that o Formally describes the semantics, or meaning of information o Represents metadata, I.e data about data How? RDF data model consists of triples o That represents links (or edges) on an RDF graph o Where the structure of each triples is Subject, Predicate, Object Example triples: obr:fred br:hasSpouse br:Wilma. obr:fred br:hasAge 25. Where: br refers to the namespace <http://bedrock> so that br:Fred expands to <http://bedrock/Fred> as a Universal Resource Identifier (URI)
  • 5.
    RDF Use Cases oInternal or public platform for data and meta-data publishing o Use case: A big media or scientific publisher needs to expose all internal information assets classified according multiple taxonomies; o Content enrichment and retrieval based on deep data o Use case: A big enterprise organization has tons of knowledge locked into textual documents describing events and entities with complex contextual information o Integration of deep and diverse data o Use case: A big enterprise with a complex knowledge driven business needs to integrate information from multiple data sources
  • 6.
  • 7.
    RDFS o What? RDFschema (RDFS) o Adds concepts such as Resource, Literal, Class and Datatype o Represents metadata, i.e data about data. Adds relationships such as subClassOf, subPropertyOf, domain and range o Provides the means to Define o Classes and properties o Hierarchies of classes and properties Includes rules to infer new statements
  • 8.
    Apply RDFS toInfer New Triples
  • 9.
    Outline o RDF andRDFS o SPARQL Overview o Ontology Overview o GraphDB Overview o GraphDB Workbench Demo o Q&A
  • 10.
    o SPARQL isa SQL-like query language for RDF graph data with the following query types: o SELECT returns tabular results o CONSTRUCT creates a new RDF graph based on query results o ASK returns ‘yes’ if the query has a solution, otherwise ‘no’ o DESCRIBE returns RDF graph data about a resource; useful when the query client does not know the structure of the RDF data in the data source o INSERT inserts triples into a graph o DELETE deletes triples from a graph. What is SPARQL?
  • 11.
    Using SPARQL toInsert Triples o To create an RDF graph, perform these steps: o Define prefixes to URIs with the PREFIX keyword o Use INSERT DATA to signify you want to insert statements. Write the subject-predicate-object statements (triples). o Execute this query. PREFIX br: <http://bedrock/> INSERT DATA { br:fred br:hasSpouse br:wilma . br:fred br:hasChild br:pebbles . br:wilma br:hasChild br:pebbles . br:pebbles br:hasSpouse br:bamm-bamm ; br:hasChild br:roxy, br:chip . }
  • 12.
    Using SPARQL toSelect Triples o To access the RDF graph you just created, perform these steps: o Define prefixes to URIs with the PREFIX keyword. o Use SELECT to signify you want to select certain information, and WHERE to signify your conditions, restrictions and filters. o Execute this query. PREFIX br: <http://bedrock/> SELECT ?subject ?predicate ?object WHERE {?subject ?predicate ?object} Subject Predicate Object br:fred br:hasChild br:pebbles br:pebbles br:hasChild br:roxy br:pebbles br:hasChild br:chip br:wilma br:hasChild br:pebbles PREFIX br: <http://bedrock/> SELECT ?subject ?predicate ?object WHERE {?subject ?predicate ?object} Subject Predicate Object br:fred br:hasChild br:pebbles br:pebbles br:hasChild br:roxy br:pebbles br:hasChild br:chip br:wilma br:hasChild br:pebbles
  • 13.
    Using SPARQL toFind Fred’s Grandchildren o To find Fred’s grandchildren, first find out if Fred has any grandchildren: o Define prefixes to URIs with the PREFIX keyword o Use ASK to discover whether Fred has a grandchild, and WHERE to signify your conditions. YES
  • 14.
    Using SPARQL toFind Fred’s Grandchildren Now that we know he has at least one grandchild, perform these steps to find the grandchild(ren): oDefine prefixes to URIs with the PREFIX keyword oUse SELECT to signify you want to select a grandchild, and WHERE to signify your conditions. PREFIX br: <http://bedrock/> SELECT ?grandChild WHERE { br:fred br:hasChild ?child . ?child br:hasChild ?grandChild . } grandChild 1. br:roxy 2. br:chip PREFIX br: <http://bedrock/> SELECT ?grandChild WHERE { br:fred br:hasChild ?child . ?child br:hasChild ?grandChild . } grandChild 1. br:roxy 2. br:chip
  • 15.
    Outline o RDF andRDFS o SPARQL Overview o Ontology Overview o GraphDB Overview o GraphDB Workbench Demo o Q&A
  • 16.
    What is Ontology Anontology is a formal specification that provides sharable and reusable knowledge representation. Examples of formal specifications include: oTaxonomies oVocabularies oThesauri oTopic Maps oLogical Models
  • 17.
    What is inan Ontology? An ontology specification includes descriptions of oConcepts and properties in a domain oRelationships between concepts oConstraints on how the relationships can be used oIndividuals as members of concepts
  • 18.
    The Benefits ofan Ontology Ontologies provide: oA common understanding of information oExplicit domain assumptions These provisions are valuable because ontologies: oSupport data integration for analytics oApply domain knowledge to data oSupport interoperation of applications oEnable model-driven applications oReduce the time and cost of application development oImprove data quality, i.e., metadata and provenance
  • 19.
    Outline o RDF andRDFS o SPARQL Overview o Ontology Overview o GraphDB Overview o GraphDB Workbench Demo o Q&A
  • 20.
    What is GraphDB? Enterpriseready Semantic Graph Database, compliant with W3C Standards
  • 21.
    GraphDB™ Editions o GraphDB™Free o GraphDB™ Standard o GraphDB™ Cloud o GraphDB™ Enterprise #21
  • 22.
    Outline o RDF andRDFS o SPARQL Overview o Ontology Overview o GraphDB Overview o GraphDB Workbench Demo o Q&A
  • 23.
  • 24.
    DEMO Install GraphDB Load Data oUsingGraphDB Workbench import page oUsing OntoRefine Query Data oSPARQL Ask oSPARQL Select oSPARQL Construct Query Monitoring
  • 25.
    DEMO o Search DATA oGraphDB Workbench Autocomplete o GraphDB Connectors – Lucene, Solr, o ElasticSearch o Visualize DATA o Visualize Class Hierarchy o GraphDB Default Visual Graph o GraphDB Custom Visual Graphs
  • 26.
    Support and FAQ’s graphDB-support@ontotext.com Additionalresources: Ontotext: Community Forum and Evaluation Support: http://stackoverflow.com/questions/tagged/graphdb GraphDB Website and Documentation: http://graphdb.ontotext.com Whitepapers, Fundamentals: http://ontotext.com/knowledge-hub/fundamentals/ SPARQL, OWL, and RDF: RDF: http://www.w3.org/TR/rdf11-concepts/ RDFS: http://www.w3.org/TR/rdf-schema/ SPARQL Overview: http://www.w3.org/TR/sparql11-overview/ SPARQL Query: http://www.w3.org/TR/sparql11-query/ SPARQL Update: http://www.w3.org/TR/sparql11-update
  • 27.
    Desislava Hristova, SeniorSoftware Engineer Get your GraphDB Today: http://ontotext.com/products/graphdb/ FactForge: Hub for open data and news about People and Organizations http://factforge.net/ Experience the technology with NOW: Semantic News Portal http://now.ontotext.com Thank you for your attention!