These are slides from a live webinar taken place January 2018.
GraphDB™ Fundamentals builds the basis for working with graph databases that utilize the W3C standards, and particularly GraphDB™. In this webinar, we demonstrated how to install and set-up GraphDB™ 8.4 and how you can generate your first RDF dataset. We also showed how to quickly integrate complex and highly interconnected data using RDF and SPARQL and much more.
With the help of GraphDB™, you can start smartly managing your data assets, visually represent your data model and get insights from them.
3. Outline
o RDF and RDFS
o SPARQL Overview
o Ontology Overview
o GraphDB Overview
o GraphDB Workbench Demo
o Q&A
4. 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)
5. 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
7. 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
9. Outline
o RDF and RDFS
o SPARQL Overview
o Ontology Overview
o GraphDB Overview
o GraphDB Workbench Demo
o Q&A
10. 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?
11. 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 .
}
12. 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
13. 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
14. 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
15. Outline
o RDF and RDFS
o SPARQL Overview
o Ontology Overview
o GraphDB Overview
o GraphDB Workbench Demo
o Q&A
16. 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
17. 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
18. 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
19. Outline
o RDF and RDFS
o SPARQL Overview
o Ontology Overview
o GraphDB Overview
o GraphDB Workbench Demo
o Q&A
25. 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
26. 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
27. 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!