SlideShare a Scribd company logo
Graph and RDF Databases
Context : Course of Advanced Databases
Prepared by : Nassim BAHRI
February 19th, 2015
Table of contents
I. Introduction :Overview of BIG DATA & NOSQL
II. Graph Databases
III. RDF Databases
IV. Application example
V. Scientific article
VI. Conclusion and Q&A
Introduction
3
Not Only SQL
Storing data in
memory
Distributed
databases
Introduction : Data Model
4
Documents Databases
(Voldemort, Riak)
Big Table Column
(Hbase, cassandra, Hypertable)
Key-Value
(MongoDB)
Graph Databases
(Neo4J)
Introduction : Data Model
5
Data complexity
Datasize
Key-Value Stores
Column Family
Document Databases
Graph Databases
90% of use cases
This is what we
are interested
Source : Neo Technology webinar
Graph Databases
What is Graph Database?
A graph database is a databases whose
specific purpose is the storage of graph-oriented data
structures.
 Is simply an object oriented database based on Graph
theory.
6
Graph Databases
Representation
• Nodes
• Relationships between nodes
• Properties on both
7
2
3
1
Name : John
Age : 43
Name : Google
Type : Ford
Color : blue
Work in
Since : 2013
Graph Databases
The power of Graph Databases
Performance Flexibility
Agility
8
Graph VS Relational Databases
Relational Database Modeling
ID Name
1 Larry Page
2 Sergey Brin
3 Larry Elisson
N …
ID Name
1 Google
2 Oracle
… …
N …
PersonID CompanyID Since
1 1 1998
2 1 2001
3 2 2010
Person
Company
WorksIn
SELECT Person.Name
FROM Person,Company,WorksIn
WHERE Company.Name='Google'
AND WorksIn.CompanyID=Company.ID
AND WorksIn.PersonId=Person.ID;
Google's employees?
Lookup
Lookup
Lookup
9
Graph VS Relational Databases
Graph Database Modeling
Name : Larry Page Name : Google
Name : Sergey Brin
Name : Oracle
Name : Larry Elisson
Person 1
Person 2
Company 1
Company 2
Person 3
WorksIN
Since : 2001
Since : 2010
Since : 1998
Lookup
10
Graph Databases
Graph storage and graph processing
1. The underlying storage
• Some databases use native graph storage,
• The other databases use relational database, an object-oriented database,…
2. The processing engine
• The nodes are physically connected to each other in database,
• index-free adjacency
11
Graph Databases
Graph Database Management System
12Source [1]
Graph Databases : Example
Visual Modeling
13
Name : John
Age : 27 FRIEND_OF
Name : Sally
Age : 32
Title : Graph Databases
Authors : Ian Robinson,
Jim Webber
Since : 01/09/2013
Since : 01/09/2013
On : 02/09/2013
Rating : 4
On : 02/03/2013
Rating : 5
FRIEND_OF
Graph Databases : Example
Create a simple dataset
// Create Sally
CREATE (sally:Person { name: 'Sally', age: 32 })
// Create John
CREATE (john:Person { name: 'John', age: 27 })
// Create Graph Databases book
CREATE (gdb:Book { title: 'Graph Databases',
authors: ['Ian Robinson', 'Jim Webber'] })
// Connect Sally and John as friends
CREATE (sally)-[:FRIEND_OF { since: 1357718400 }]->(john)
// Connect Sally to Graph Databases book
CREATE (sally)-[:HAS_READ { rating: 4, on: 1360396800 }]->(gdb)
// Connect John to Graph Databases book
CREATE (john)-[:HAS_READ { rating: 5, on: 1359878400 }]->(gdb)
14
Graph Databases : Example
15
Graph Databases : Example
Simple selection from node:
Query 1 : How old are Sally?
MATCH (sally:Person { name: 'Sally' })
RETURN sally.age as sally_age
16
Graph Databases : Example
Simple selection from node:
Query 2 : Who are the authors of Graph Databases?
MATCH (gdb:Book { title: 'Graph Databases' })
RETURN gdb.authors as authors
17
Graph Databases : Example
Selection using relationship:
Query 3 : Who are sally's friends?
MATCH (sally:Person { name: 'Sally' })
MATCH (sally)-[r:FRIEND_OF]-(person)
RETURN person.name as sally_friend
18
Graph Databases : Example
Selection using relationship and group function:
Query 4 : What is the average rating of Graph Databases?
MATCH (gdb:Book { title: 'Graph Databases' })
MATCH (gdb)<-[r:HAS_READ]-()
RETURN avg(r.rating) as average_rating
19
Graph Databases : Example
Using order and limit in query:
Query 5 : Who Read Graph Databases First, Sally or John?
MATCH (people:Person)
WHERE people.name = 'John' OR people.name = 'Sally'
MATCH (people)-[r:HAS_READ]->(gdb:Book { title: 'Graph
Databases' })
RETURN people.name as first_reader
ORDER BY r.on
LIMIT 1
20
Graph Databases : Example
Visual Modeling
21
Name : John
Age : 27 FRIEND_OF
Name : Sally
Age : 32
Name : Alain
Age : 19
Since : 01/09/2013
Since : 01/09/2013
FRIEND_OF
Since : 01/11/2014
Graph Databases : Example
Completing our schema
// Create Alain
CREATE (alain:Person { name: 'Alain', age: 19 })
// Connect Sally and Alain as friends
MATCH (alain:Person { name: 'Alain' })
MATCH (sally:Person { name: 'Sally' })
CREATE (sally)-[:FRIEND_OF { since: 1358818400 }]->(alain)
22
Alain
Sally
John
GDB book
Graph Databases : Example
Node / relationship navigation:
Query 6 : Which is shared between Alain and John Friend?
MATCH (alain:Person { name: 'Alain' })
MATCH (john:Person { name: 'John' })
MATCH (alain)-[:FRIEND_OF]-(person)-[:FRIEND_OF]-(john)
RETURN person.name as friend
23
Graph Databases : Example
Update node’s properties:
Query 7 : Change Alain name to Larry
MATCH (n { name: 'Alain' })
SET n.name = 'Larry'
Query 8 : Remove property
MATCH (n { name: 'Larry' })
SET n.name = NULL
Query 9 : Add property
MATCH (n { name: 'John' })
SET n += { hungry: TRUE , position: 'Entrepreneur' } 24
RDF Databases
The principle of the web
25
HTTP Request
HTTP Response
URL : http://website.com
Communication protocol : HTTP
Representation language : HTML
RDF Databases
Changing status
26
URL URI IRI
Uniform Resource
Locator
Uniform Resource
Identifier
International Resource
Identifier
http://website.com http://animals.com#lion http://‫.الحيوانات‬tn#lion
RDF Databases
W3C Standards
27
Identification
Representation
Query Reasoning
RDF Databases
RDF
Resource
Description
Framework
28
means
: pages, person, animals
Idea,…
: attributes, characteristics,
Relationship,…
: Model, language and
syntax to build description
RDF Databases
Data model & syntax
Description : (Subject, Predicate, object)
“example : doc.html is created by John and belongs to the music
theme”
29
Doc.html is created by John
Doc.html belongs to music theme
RDF Databases
Data model & syntax
(Subject, Predicate, object)
(Vertex, edge, Vertex)
30
John
Doc.html
Music
Author
Theme
RDF Databases
Labeled graph with URI and literals
31
http://www.website.com/john#me
http://www.website.com/doc.html
Music
http://www.website.com/schema#author
http://www.website.com/schema#theme
RDF Databases
RDF Syntaxes
XML, Turtle, TriG, JSON-LD,…
Turtle syntax
@prefix rdf : <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
@prefix site : <http://www.website.com/schema#>
<http://www.website.com/doc.html>
site:author <http://www.website.com/john#me>;
site:theme "Music".
32
RDF Databases
SPARQL Protocol And RDF Query Language
• Syntax similar to SQL
SELECT data,
FROM data source
WHERE { conditions }
33
RDF Databases
SPARQL Protocol And RDF Query Language
?x rdf:type ex:Person
Get all person
SELECT ?subject ?property ?value
WHERE { ?subject ?property ?value }
Get the full Graph database
SELECT ?x WHERE
{ ?x rdf:type ex:Person .
?x :name ?name . }
Get all person who have a name
34
RDF Databases
SPARQL Protocol And RDF Query Language
Declaring prefixes
PREFIX esen : <http://esen.tn#>
SELECT ?student
WHERE {
?student esen:registeredAt ?x.
}
35
RDF Databases
SPARQL Protocol And RDF Query Language
Optional pattern
PREFIX foaf : <http://xmlns.com/foaf/0.1>
SELECT ?person ?name
WHERE {
?person foaf:homepage <http://john.info> .
OPTIONAL { ?person foaf:name ?name .}
}
name : unbound
36
RDF Databases
SPARQL Protocol And RDF Query Language
Union
PREFIX foaf : <http://xmlns.com/foaf/0.1>
SELECT ?name
WHERE {
?person foaf:name ?name .
{
{?person foaf:homepage <http://john.info> .} UNION
{?person foaf:homepage <http://paul.info> .}
}
} 37
RDF Databases
SPARQL Protocol And RDF Query Language
Minus
PREFIX ex : <http://website.com#>
SELECT ?person
WHERE {
{ ?person rdf:type ?type }
MINUS { ?person rdf:type ex:student }
}
38
RDF Databases
Use case : rich snippets Google
39
<div xmlns:v="http://rdf.data-vocabulary.org/#"
typeof="v:Person">
My name is <span property="v:name">
Pierre Dumoulin</span>.
My personal homepage:
<a href="http://www.example.com" rel="v:url" >
www.homepage.com</a>I’m living is
<span rel="v:address" typeof="v:address">
<span property="v:street-address">12 street name</span>
<span property="v:locality">city name</span>
,<span property="v:region">XY</span>
<span property="v:postal-code">12345</span>.
<span>
</div>
Application example (RDF)
Data storage
# Default graph (stored at http://example.org/foaf/aliceFoaf)
@prefix foaf: <http://xmlns.com/foaf/0.1/>
. _:a foaf:name "Alice" .
. _:b foaf:mbox <mailto:bob@work.example> .
. _:a foaf:mbox <mailto:alice@work.example> .
Query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name
FROM <http://example.org/foaf/aliceFoaf>
WHERE { ?x foaf:name ?name }
40
Name
Alice
Result
Application example (Neo4J)
Question : Who is older, Sally or John?
41
Name : John
Age : 27 FRIEND_OF
Name : Sally
Age : 32
Name : Alain
Age : 19
Since : 01/09/2013
Since : 01/09/2013
FRIEND_OF
Since : 01/11/2014
Application example (Neo4J)
Who is older, Sally or John?
MATCH (people:Person)
WHERE people.name = 'John' OR people.name = 'Sally'
RETURN people.name as oldest
ORDER BY people.age DESC
LIMIT 1
42
Scientific article
Title : Querying RDF Data from a Graph Database Perspective
Book title : The Semantic Web: Research and Applications
Pages : 346-360
Online ISBN : 978-3-540-31547-6
Series Volume : 3532
Publisher : Springer Berlin Heidelberg
Copyright : 2005
Authors : Renzo Angles
Claudio Gutierrez
43
Scientific article
MODEL LEVEL DATA
COMPLEXITY
CONNECTIVITY TYPE OF DATA
Network physical simple high homogeneous
Relational logical simple low homogeneous
Semantic user simple/medium high homogeneous
Object-O logical/physical complex Medium heterogeneous
XML logical medium medium heterogeneous
RDF logical medium high heterogeneous
44
Table 1 : Summary of comparison among different database models
Scientific article
PROPERTY G G+ GraphLog Gram GraphDB Lorel F-G
Adjacent nodes +/- √ √ √ +/- √ +/-
Adjacent edges +/- √ √ √ +/- √ +/-
Degree of a node X √ √ x ? X x
Path √ √ √ √ √ √ √
Fixed-length Path √ √ √ √ √ √ √
Distance between two nodes X √ √ X ? x x
Diameter x √ √ X ? x X
45
Table 2 : Support of some graph database query languages for the example graph properties
Scientific article
PROPERTY RQL SeRQL RDQL Triple N3 Versa RxPath
Adjacent nodes +/- +/- +/- +/- +/- +/- X
Adjacent edges +/- +/- +/- +/- X x X
Degree of a node +/- x x x x x X
Path x x x x X x +/-
Fixed-length Path +/- +/- +/- +/- +/- X +/-
Distance between two nodes x x x x x x X
Diameter x x x x x x x
46
Table 3 : Support of some current RDF query languages for some example graph properties
Conclusion
• Using Graph database for storing data in graph form or in
hierarchical tree structure.
• Graph database : Performance, Agility, Flexibility
• The shortest path
47
Bibliography
[1] Ian Robinson, Jim Webber, and Emil Eifrem.«Graph Databases».O’REILLY, 2013.
[2] Serge Miranda, Fabien Gandon. «Des Bases de Données à Big Data». Course at
Nice Sophia university, MOOC, 2015.
[3] Michel Domenjoud. «Bases de données graphes : un tour d’horizon». Available
on <http://blog.octo.com/bases-de-donnees-graphes-un-tour-dhorizon> (consulted
18/02/2015).
[4] Neo4J community. «Cypher Query Language». Available on
<http://neo4j.com/developer/data-modeling/> (consulted 18/02/2015).
[5] Frank Manola, Eric Miller, Brian McBride. «RDF 1.1 Primer». Available on
<http://www.w3.org/TR/2014/NOTE-rdf11-primer-20140225/> (consulted
18/02/2015).
[6] Eric Prud'hommeaux, Andy Seaborne. «SPARQL Query Language for RDF».
Available on <http://www.w3.org/TR/rdf-sparql-query/> (consulted 18/02/2015).
[7] Neo4J community. «Introduction to graph databases webinar». Available on
<http://www.neo4j.org/learn/videos_webinar> (consulted 18/02/2015).
48
49
Thanks for your attention

More Related Content

What's hot (20)

Chapitre 2 hadoop
Chapitre 2 hadoopChapitre 2 hadoop
Chapitre 2 hadoop
Mouna Torjmen
 
Introduction to Apache Hive
Introduction to Apache HiveIntroduction to Apache Hive
Introduction to Apache Hive
Avkash Chauhan
 
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
Edureka!
 
Introduction to RDF & SPARQL
Introduction to RDF & SPARQLIntroduction to RDF & SPARQL
Introduction to RDF & SPARQL
Open Data Support
 
Cours Big Data Chap4 - Spark
Cours Big Data Chap4 - SparkCours Big Data Chap4 - Spark
Cours Big Data Chap4 - Spark
Amal Abid
 
Introduction to linked data
Introduction to linked dataIntroduction to linked data
Introduction to linked data
Open Data Support
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
Harri Kauhanen
 
Querying the Wikidata Knowledge Graph
Querying the Wikidata Knowledge GraphQuerying the Wikidata Knowledge Graph
Querying the Wikidata Knowledge Graph
Ioan Toma
 
Cours Big Data Chap3
Cours Big Data Chap3Cours Big Data Chap3
Cours Big Data Chap3
Amal Abid
 
Apache Spark Introduction
Apache Spark IntroductionApache Spark Introduction
Apache Spark Introduction
sudhakara st
 
Apache Spark Architecture
Apache Spark ArchitectureApache Spark Architecture
Apache Spark Architecture
Alexey Grishchenko
 
An Introduction to SPARQL
An Introduction to SPARQLAn Introduction to SPARQL
An Introduction to SPARQL
Olaf Hartig
 
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
CloudxLab
 
Apache Spark in Depth: Core Concepts, Architecture & Internals
Apache Spark in Depth: Core Concepts, Architecture & InternalsApache Spark in Depth: Core Concepts, Architecture & Internals
Apache Spark in Depth: Core Concepts, Architecture & Internals
Anton Kirillov
 
Présentation des bases de données orientées graphes
Présentation des bases de données orientées graphesPrésentation des bases de données orientées graphes
Présentation des bases de données orientées graphes
Koffi Sani
 
Apache Spark Introduction and Resilient Distributed Dataset basics and deep dive
Apache Spark Introduction and Resilient Distributed Dataset basics and deep diveApache Spark Introduction and Resilient Distributed Dataset basics and deep dive
Apache Spark Introduction and Resilient Distributed Dataset basics and deep dive
Sachin Aggarwal
 
OLTP+OLAP=HTAP
 OLTP+OLAP=HTAP OLTP+OLAP=HTAP
OLTP+OLAP=HTAP
EDB
 
Intro to Neo4j and Graph Databases
Intro to Neo4j and Graph DatabasesIntro to Neo4j and Graph Databases
Intro to Neo4j and Graph Databases
Neo4j
 
Linked Data: principles and examples
Linked Data: principles and examples Linked Data: principles and examples
Linked Data: principles and examples
Victor de Boer
 
Validating RDF data: Challenges and perspectives
Validating RDF data: Challenges and perspectivesValidating RDF data: Challenges and perspectives
Validating RDF data: Challenges and perspectives
Jose Emilio Labra Gayo
 
Introduction to Apache Hive
Introduction to Apache HiveIntroduction to Apache Hive
Introduction to Apache Hive
Avkash Chauhan
 
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
Edureka!
 
Introduction to RDF & SPARQL
Introduction to RDF & SPARQLIntroduction to RDF & SPARQL
Introduction to RDF & SPARQL
Open Data Support
 
Cours Big Data Chap4 - Spark
Cours Big Data Chap4 - SparkCours Big Data Chap4 - Spark
Cours Big Data Chap4 - Spark
Amal Abid
 
Querying the Wikidata Knowledge Graph
Querying the Wikidata Knowledge GraphQuerying the Wikidata Knowledge Graph
Querying the Wikidata Knowledge Graph
Ioan Toma
 
Cours Big Data Chap3
Cours Big Data Chap3Cours Big Data Chap3
Cours Big Data Chap3
Amal Abid
 
Apache Spark Introduction
Apache Spark IntroductionApache Spark Introduction
Apache Spark Introduction
sudhakara st
 
An Introduction to SPARQL
An Introduction to SPARQLAn Introduction to SPARQL
An Introduction to SPARQL
Olaf Hartig
 
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 1 | Big Data Hadoop Spark Tutori...
CloudxLab
 
Apache Spark in Depth: Core Concepts, Architecture & Internals
Apache Spark in Depth: Core Concepts, Architecture & InternalsApache Spark in Depth: Core Concepts, Architecture & Internals
Apache Spark in Depth: Core Concepts, Architecture & Internals
Anton Kirillov
 
Présentation des bases de données orientées graphes
Présentation des bases de données orientées graphesPrésentation des bases de données orientées graphes
Présentation des bases de données orientées graphes
Koffi Sani
 
Apache Spark Introduction and Resilient Distributed Dataset basics and deep dive
Apache Spark Introduction and Resilient Distributed Dataset basics and deep diveApache Spark Introduction and Resilient Distributed Dataset basics and deep dive
Apache Spark Introduction and Resilient Distributed Dataset basics and deep dive
Sachin Aggarwal
 
OLTP+OLAP=HTAP
 OLTP+OLAP=HTAP OLTP+OLAP=HTAP
OLTP+OLAP=HTAP
EDB
 
Intro to Neo4j and Graph Databases
Intro to Neo4j and Graph DatabasesIntro to Neo4j and Graph Databases
Intro to Neo4j and Graph Databases
Neo4j
 
Linked Data: principles and examples
Linked Data: principles and examples Linked Data: principles and examples
Linked Data: principles and examples
Victor de Boer
 
Validating RDF data: Challenges and perspectives
Validating RDF data: Challenges and perspectivesValidating RDF data: Challenges and perspectives
Validating RDF data: Challenges and perspectives
Jose Emilio Labra Gayo
 

Viewers also liked (12)

Conception et développement d&rsquo;une place de marché B2C
Conception et développement d&rsquo;une place de marché B2CConception et développement d&rsquo;une place de marché B2C
Conception et développement d&rsquo;une place de marché B2C
Nassim Bahri
 
Héberger vos applications web grâce à openshift cloud
Héberger vos applications web grâce à openshift cloudHéberger vos applications web grâce à openshift cloud
Héberger vos applications web grâce à openshift cloud
Nassim Bahri
 
Gidsy.com
Gidsy.comGidsy.com
Gidsy.com
Nassim Bahri
 
Le système de versioning git
Le système de versioning gitLe système de versioning git
Le système de versioning git
Nassim Bahri
 
Célèbres pannes du génie logiciel
Célèbres pannes du génie logicielCélèbres pannes du génie logiciel
Célèbres pannes du génie logiciel
Nassim Bahri
 
DataWerhouse : Données de qualité
DataWerhouse : Données de qualitéDataWerhouse : Données de qualité
DataWerhouse : Données de qualité
Nassim Bahri
 
Scrum (votre guide de poche)
Scrum (votre guide de poche)Scrum (votre guide de poche)
Scrum (votre guide de poche)
Nassim Bahri
 
RFID
RFIDRFID
RFID
Nassim Bahri
 
Implémentation d&rsquo;une solution E-CRM
Implémentation d&rsquo;une solution E-CRMImplémentation d&rsquo;une solution E-CRM
Implémentation d&rsquo;une solution E-CRM
Nassim Bahri
 
PFE :: Application de gestion des dus d'enseignement
PFE :: Application de gestion des dus d'enseignementPFE :: Application de gestion des dus d'enseignement
PFE :: Application de gestion des dus d'enseignement
Nassim Bahri
 
Prestashop le leader des cms
Prestashop le leader des cmsPrestashop le leader des cms
Prestashop le leader des cms
Nassim Bahri
 
Guide talend
Guide talendGuide talend
Guide talend
Nassim Bahri
 
Conception et développement d&rsquo;une place de marché B2C
Conception et développement d&rsquo;une place de marché B2CConception et développement d&rsquo;une place de marché B2C
Conception et développement d&rsquo;une place de marché B2C
Nassim Bahri
 
Héberger vos applications web grâce à openshift cloud
Héberger vos applications web grâce à openshift cloudHéberger vos applications web grâce à openshift cloud
Héberger vos applications web grâce à openshift cloud
Nassim Bahri
 
Le système de versioning git
Le système de versioning gitLe système de versioning git
Le système de versioning git
Nassim Bahri
 
Célèbres pannes du génie logiciel
Célèbres pannes du génie logicielCélèbres pannes du génie logiciel
Célèbres pannes du génie logiciel
Nassim Bahri
 
DataWerhouse : Données de qualité
DataWerhouse : Données de qualitéDataWerhouse : Données de qualité
DataWerhouse : Données de qualité
Nassim Bahri
 
Scrum (votre guide de poche)
Scrum (votre guide de poche)Scrum (votre guide de poche)
Scrum (votre guide de poche)
Nassim Bahri
 
Implémentation d&rsquo;une solution E-CRM
Implémentation d&rsquo;une solution E-CRMImplémentation d&rsquo;une solution E-CRM
Implémentation d&rsquo;une solution E-CRM
Nassim Bahri
 
PFE :: Application de gestion des dus d'enseignement
PFE :: Application de gestion des dus d'enseignementPFE :: Application de gestion des dus d'enseignement
PFE :: Application de gestion des dus d'enseignement
Nassim Bahri
 
Prestashop le leader des cms
Prestashop le leader des cmsPrestashop le leader des cms
Prestashop le leader des cms
Nassim Bahri
 

Similar to Graph and RDF databases (20)

Challenges and applications of RDF shapes
Challenges and applications of RDF shapesChallenges and applications of RDF shapes
Challenges and applications of RDF shapes
Jose Emilio Labra Gayo
 
Mon norton tut_queryinglinkeddata02
Mon norton tut_queryinglinkeddata02Mon norton tut_queryinglinkeddata02
Mon norton tut_queryinglinkeddata02
eswcsummerschool
 
Neo4j Graph Database และการประยุกตร์ใช้
Neo4j Graph Database และการประยุกตร์ใช้Neo4j Graph Database และการประยุกตร์ใช้
Neo4j Graph Database และการประยุกตร์ใช้
Chakrit Phain
 
Two graph data models : RDF and Property Graphs
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphs
andyseaborne
 
Sparql
SparqlSparql
Sparql
Serge Garlatti
 
HyperGraphQL
HyperGraphQLHyperGraphQL
HyperGraphQL
Szymon Klarman
 
Data Source API in Spark
Data Source API in SparkData Source API in Spark
Data Source API in Spark
Databricks
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
Paolo Pareti
 
Consuming Linked Data SemTech2010
Consuming Linked Data SemTech2010Consuming Linked Data SemTech2010
Consuming Linked Data SemTech2010
Juan Sequeda
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
Josef Petrák
 
The Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLThe Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQL
Myungjin Lee
 
Creating Web APIs with JSON-LD and RDF
Creating Web APIs with JSON-LD and RDFCreating Web APIs with JSON-LD and RDF
Creating Web APIs with JSON-LD and RDF
donaldlsmithjr
 
Introduction to linked data and the semantic web
Introduction to linked data and the semantic webIntroduction to linked data and the semantic web
Introduction to linked data and the semantic web
Dave Reynolds
 
Evolving from RDBMS to NoSQL + SQL
Evolving from RDBMS to NoSQL + SQLEvolving from RDBMS to NoSQL + SQL
Evolving from RDBMS to NoSQL + SQL
MapR Technologies
 
ShEx by Example
ShEx by ExampleShEx by Example
ShEx by Example
Jose Emilio Labra Gayo
 
Wed roman tut_open_datapub
Wed roman tut_open_datapubWed roman tut_open_datapub
Wed roman tut_open_datapub
eswcsummerschool
 
Sparql
SparqlSparql
Sparql
Tamrat Amare
 
RDF validation tutorial
RDF validation tutorialRDF validation tutorial
RDF validation tutorial
Jose Emilio Labra Gayo
 
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph DatabaseBringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Jimmy Angelakos
 
Tutorial Linked APIs
Tutorial Linked APIsTutorial Linked APIs
Tutorial Linked APIs
Steffen Stadtmüller
 
Challenges and applications of RDF shapes
Challenges and applications of RDF shapesChallenges and applications of RDF shapes
Challenges and applications of RDF shapes
Jose Emilio Labra Gayo
 
Mon norton tut_queryinglinkeddata02
Mon norton tut_queryinglinkeddata02Mon norton tut_queryinglinkeddata02
Mon norton tut_queryinglinkeddata02
eswcsummerschool
 
Neo4j Graph Database และการประยุกตร์ใช้
Neo4j Graph Database และการประยุกตร์ใช้Neo4j Graph Database และการประยุกตร์ใช้
Neo4j Graph Database และการประยุกตร์ใช้
Chakrit Phain
 
Two graph data models : RDF and Property Graphs
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphs
andyseaborne
 
Data Source API in Spark
Data Source API in SparkData Source API in Spark
Data Source API in Spark
Databricks
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
Paolo Pareti
 
Consuming Linked Data SemTech2010
Consuming Linked Data SemTech2010Consuming Linked Data SemTech2010
Consuming Linked Data SemTech2010
Juan Sequeda
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
Josef Petrák
 
The Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLThe Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQL
Myungjin Lee
 
Creating Web APIs with JSON-LD and RDF
Creating Web APIs with JSON-LD and RDFCreating Web APIs with JSON-LD and RDF
Creating Web APIs with JSON-LD and RDF
donaldlsmithjr
 
Introduction to linked data and the semantic web
Introduction to linked data and the semantic webIntroduction to linked data and the semantic web
Introduction to linked data and the semantic web
Dave Reynolds
 
Evolving from RDBMS to NoSQL + SQL
Evolving from RDBMS to NoSQL + SQLEvolving from RDBMS to NoSQL + SQL
Evolving from RDBMS to NoSQL + SQL
MapR Technologies
 
Wed roman tut_open_datapub
Wed roman tut_open_datapubWed roman tut_open_datapub
Wed roman tut_open_datapub
eswcsummerschool
 
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph DatabaseBringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Jimmy Angelakos
 

Recently uploaded (20)

Influence line diagram in a robust model
Influence line diagram in a robust modelInfluence line diagram in a robust model
Influence line diagram in a robust model
ParthaSengupta26
 
UNIT-5-PPT Computer Control Power of Power System
UNIT-5-PPT Computer Control Power of Power SystemUNIT-5-PPT Computer Control Power of Power System
UNIT-5-PPT Computer Control Power of Power System
Sridhar191373
 
ISO 4548-9 Oil Filter Anti Drain Catalogue.pdf
ISO 4548-9 Oil Filter Anti Drain Catalogue.pdfISO 4548-9 Oil Filter Anti Drain Catalogue.pdf
ISO 4548-9 Oil Filter Anti Drain Catalogue.pdf
FILTRATION ENGINEERING & CUNSULTANT
 
module 2 - Minerals and Internal Structure of Earth - ERMS.pdf
module 2 - Minerals and Internal Structure of Earth - ERMS.pdfmodule 2 - Minerals and Internal Structure of Earth - ERMS.pdf
module 2 - Minerals and Internal Structure of Earth - ERMS.pdf
shivamkumarsharma441
 
PPT on Grid resilience against Natural disasters.pptx
PPT on Grid resilience against Natural disasters.pptxPPT on Grid resilience against Natural disasters.pptx
PPT on Grid resilience against Natural disasters.pptx
manesumit66
 
Video Games and Artificial-Realities.pptx
Video Games and Artificial-Realities.pptxVideo Games and Artificial-Realities.pptx
Video Games and Artificial-Realities.pptx
HadiBadri1
 
9aeb2aae-3b85-47a5-9776-154883bbae57.pdf
9aeb2aae-3b85-47a5-9776-154883bbae57.pdf9aeb2aae-3b85-47a5-9776-154883bbae57.pdf
9aeb2aae-3b85-47a5-9776-154883bbae57.pdf
RishabhGupta578788
 
UNIT-1-PPT-Introduction about Power System Operation and Control
UNIT-1-PPT-Introduction about Power System Operation and ControlUNIT-1-PPT-Introduction about Power System Operation and Control
UNIT-1-PPT-Introduction about Power System Operation and Control
Sridhar191373
 
ISO 4548-7 Filter Vibration Fatigue Test Rig Catalogue.pdf
ISO 4548-7 Filter Vibration Fatigue Test Rig Catalogue.pdfISO 4548-7 Filter Vibration Fatigue Test Rig Catalogue.pdf
ISO 4548-7 Filter Vibration Fatigue Test Rig Catalogue.pdf
FILTRATION ENGINEERING & CUNSULTANT
 
Silent-Aire Quality Orientation - OFCI_GC - EVAP Unit REV2.pdf
Silent-Aire Quality Orientation - OFCI_GC - EVAP Unit REV2.pdfSilent-Aire Quality Orientation - OFCI_GC - EVAP Unit REV2.pdf
Silent-Aire Quality Orientation - OFCI_GC - EVAP Unit REV2.pdf
EfrainGarrilloRuiz1
 
Structural Health and Factors affecting.pptx
Structural Health and Factors affecting.pptxStructural Health and Factors affecting.pptx
Structural Health and Factors affecting.pptx
gunjalsachin
 
Department of Environment (DOE) Mix Design with Fly Ash.
Department of Environment (DOE) Mix Design with Fly Ash.Department of Environment (DOE) Mix Design with Fly Ash.
Department of Environment (DOE) Mix Design with Fly Ash.
MdManikurRahman
 
UNIT-4-PPT UNIT COMMITMENT AND ECONOMIC DISPATCH
UNIT-4-PPT UNIT COMMITMENT AND ECONOMIC DISPATCHUNIT-4-PPT UNIT COMMITMENT AND ECONOMIC DISPATCH
UNIT-4-PPT UNIT COMMITMENT AND ECONOMIC DISPATCH
Sridhar191373
 
BEC602-Module-3-1_Notes.pdf. Vlsi design and testing notes
BEC602-Module-3-1_Notes.pdf. Vlsi design and testing notesBEC602-Module-3-1_Notes.pdf. Vlsi design and testing notes
BEC602-Module-3-1_Notes.pdf. Vlsi design and testing notes
VarshithaP6
 
Kevin Corke Spouse Revealed A Deep Dive Into His Private Life.pdf
Kevin Corke Spouse Revealed A Deep Dive Into His Private Life.pdfKevin Corke Spouse Revealed A Deep Dive Into His Private Life.pdf
Kevin Corke Spouse Revealed A Deep Dive Into His Private Life.pdf
Medicoz Clinic
 
Air Filter Flat Sheet Media-Catalouge-Final.pdf
Air Filter Flat Sheet Media-Catalouge-Final.pdfAir Filter Flat Sheet Media-Catalouge-Final.pdf
Air Filter Flat Sheet Media-Catalouge-Final.pdf
FILTRATION ENGINEERING & CUNSULTANT
 
Highway Engineering - Pavement materials
Highway Engineering - Pavement materialsHighway Engineering - Pavement materials
Highway Engineering - Pavement materials
AmrutaBhosale9
 
BEC602- Module 3-2-Notes.pdf.Vlsi design and testing notes
BEC602- Module 3-2-Notes.pdf.Vlsi design and testing notesBEC602- Module 3-2-Notes.pdf.Vlsi design and testing notes
BEC602- Module 3-2-Notes.pdf.Vlsi design and testing notes
VarshithaP6
 
Design of a Hand Rehabilitation Device for Post-Stroke Patients..pptx
Design of a Hand Rehabilitation Device for Post-Stroke Patients..pptxDesign of a Hand Rehabilitation Device for Post-Stroke Patients..pptx
Design of a Hand Rehabilitation Device for Post-Stroke Patients..pptx
younisalsadah
 
Software_Engineering_in_6_Hours_lyst1728638742594.pdf
Software_Engineering_in_6_Hours_lyst1728638742594.pdfSoftware_Engineering_in_6_Hours_lyst1728638742594.pdf
Software_Engineering_in_6_Hours_lyst1728638742594.pdf
VanshMunjal7
 
Influence line diagram in a robust model
Influence line diagram in a robust modelInfluence line diagram in a robust model
Influence line diagram in a robust model
ParthaSengupta26
 
UNIT-5-PPT Computer Control Power of Power System
UNIT-5-PPT Computer Control Power of Power SystemUNIT-5-PPT Computer Control Power of Power System
UNIT-5-PPT Computer Control Power of Power System
Sridhar191373
 
module 2 - Minerals and Internal Structure of Earth - ERMS.pdf
module 2 - Minerals and Internal Structure of Earth - ERMS.pdfmodule 2 - Minerals and Internal Structure of Earth - ERMS.pdf
module 2 - Minerals and Internal Structure of Earth - ERMS.pdf
shivamkumarsharma441
 
PPT on Grid resilience against Natural disasters.pptx
PPT on Grid resilience against Natural disasters.pptxPPT on Grid resilience against Natural disasters.pptx
PPT on Grid resilience against Natural disasters.pptx
manesumit66
 
Video Games and Artificial-Realities.pptx
Video Games and Artificial-Realities.pptxVideo Games and Artificial-Realities.pptx
Video Games and Artificial-Realities.pptx
HadiBadri1
 
9aeb2aae-3b85-47a5-9776-154883bbae57.pdf
9aeb2aae-3b85-47a5-9776-154883bbae57.pdf9aeb2aae-3b85-47a5-9776-154883bbae57.pdf
9aeb2aae-3b85-47a5-9776-154883bbae57.pdf
RishabhGupta578788
 
UNIT-1-PPT-Introduction about Power System Operation and Control
UNIT-1-PPT-Introduction about Power System Operation and ControlUNIT-1-PPT-Introduction about Power System Operation and Control
UNIT-1-PPT-Introduction about Power System Operation and Control
Sridhar191373
 
Silent-Aire Quality Orientation - OFCI_GC - EVAP Unit REV2.pdf
Silent-Aire Quality Orientation - OFCI_GC - EVAP Unit REV2.pdfSilent-Aire Quality Orientation - OFCI_GC - EVAP Unit REV2.pdf
Silent-Aire Quality Orientation - OFCI_GC - EVAP Unit REV2.pdf
EfrainGarrilloRuiz1
 
Structural Health and Factors affecting.pptx
Structural Health and Factors affecting.pptxStructural Health and Factors affecting.pptx
Structural Health and Factors affecting.pptx
gunjalsachin
 
Department of Environment (DOE) Mix Design with Fly Ash.
Department of Environment (DOE) Mix Design with Fly Ash.Department of Environment (DOE) Mix Design with Fly Ash.
Department of Environment (DOE) Mix Design with Fly Ash.
MdManikurRahman
 
UNIT-4-PPT UNIT COMMITMENT AND ECONOMIC DISPATCH
UNIT-4-PPT UNIT COMMITMENT AND ECONOMIC DISPATCHUNIT-4-PPT UNIT COMMITMENT AND ECONOMIC DISPATCH
UNIT-4-PPT UNIT COMMITMENT AND ECONOMIC DISPATCH
Sridhar191373
 
BEC602-Module-3-1_Notes.pdf. Vlsi design and testing notes
BEC602-Module-3-1_Notes.pdf. Vlsi design and testing notesBEC602-Module-3-1_Notes.pdf. Vlsi design and testing notes
BEC602-Module-3-1_Notes.pdf. Vlsi design and testing notes
VarshithaP6
 
Kevin Corke Spouse Revealed A Deep Dive Into His Private Life.pdf
Kevin Corke Spouse Revealed A Deep Dive Into His Private Life.pdfKevin Corke Spouse Revealed A Deep Dive Into His Private Life.pdf
Kevin Corke Spouse Revealed A Deep Dive Into His Private Life.pdf
Medicoz Clinic
 
Highway Engineering - Pavement materials
Highway Engineering - Pavement materialsHighway Engineering - Pavement materials
Highway Engineering - Pavement materials
AmrutaBhosale9
 
BEC602- Module 3-2-Notes.pdf.Vlsi design and testing notes
BEC602- Module 3-2-Notes.pdf.Vlsi design and testing notesBEC602- Module 3-2-Notes.pdf.Vlsi design and testing notes
BEC602- Module 3-2-Notes.pdf.Vlsi design and testing notes
VarshithaP6
 
Design of a Hand Rehabilitation Device for Post-Stroke Patients..pptx
Design of a Hand Rehabilitation Device for Post-Stroke Patients..pptxDesign of a Hand Rehabilitation Device for Post-Stroke Patients..pptx
Design of a Hand Rehabilitation Device for Post-Stroke Patients..pptx
younisalsadah
 
Software_Engineering_in_6_Hours_lyst1728638742594.pdf
Software_Engineering_in_6_Hours_lyst1728638742594.pdfSoftware_Engineering_in_6_Hours_lyst1728638742594.pdf
Software_Engineering_in_6_Hours_lyst1728638742594.pdf
VanshMunjal7
 

Graph and RDF databases

  • 1. Graph and RDF Databases Context : Course of Advanced Databases Prepared by : Nassim BAHRI February 19th, 2015
  • 2. Table of contents I. Introduction :Overview of BIG DATA & NOSQL II. Graph Databases III. RDF Databases IV. Application example V. Scientific article VI. Conclusion and Q&A
  • 3. Introduction 3 Not Only SQL Storing data in memory Distributed databases
  • 4. Introduction : Data Model 4 Documents Databases (Voldemort, Riak) Big Table Column (Hbase, cassandra, Hypertable) Key-Value (MongoDB) Graph Databases (Neo4J)
  • 5. Introduction : Data Model 5 Data complexity Datasize Key-Value Stores Column Family Document Databases Graph Databases 90% of use cases This is what we are interested Source : Neo Technology webinar
  • 6. Graph Databases What is Graph Database? A graph database is a databases whose specific purpose is the storage of graph-oriented data structures.  Is simply an object oriented database based on Graph theory. 6
  • 7. Graph Databases Representation • Nodes • Relationships between nodes • Properties on both 7 2 3 1 Name : John Age : 43 Name : Google Type : Ford Color : blue Work in Since : 2013
  • 8. Graph Databases The power of Graph Databases Performance Flexibility Agility 8
  • 9. Graph VS Relational Databases Relational Database Modeling ID Name 1 Larry Page 2 Sergey Brin 3 Larry Elisson N … ID Name 1 Google 2 Oracle … … N … PersonID CompanyID Since 1 1 1998 2 1 2001 3 2 2010 Person Company WorksIn SELECT Person.Name FROM Person,Company,WorksIn WHERE Company.Name='Google' AND WorksIn.CompanyID=Company.ID AND WorksIn.PersonId=Person.ID; Google's employees? Lookup Lookup Lookup 9
  • 10. Graph VS Relational Databases Graph Database Modeling Name : Larry Page Name : Google Name : Sergey Brin Name : Oracle Name : Larry Elisson Person 1 Person 2 Company 1 Company 2 Person 3 WorksIN Since : 2001 Since : 2010 Since : 1998 Lookup 10
  • 11. Graph Databases Graph storage and graph processing 1. The underlying storage • Some databases use native graph storage, • The other databases use relational database, an object-oriented database,… 2. The processing engine • The nodes are physically connected to each other in database, • index-free adjacency 11
  • 12. Graph Databases Graph Database Management System 12Source [1]
  • 13. Graph Databases : Example Visual Modeling 13 Name : John Age : 27 FRIEND_OF Name : Sally Age : 32 Title : Graph Databases Authors : Ian Robinson, Jim Webber Since : 01/09/2013 Since : 01/09/2013 On : 02/09/2013 Rating : 4 On : 02/03/2013 Rating : 5 FRIEND_OF
  • 14. Graph Databases : Example Create a simple dataset // Create Sally CREATE (sally:Person { name: 'Sally', age: 32 }) // Create John CREATE (john:Person { name: 'John', age: 27 }) // Create Graph Databases book CREATE (gdb:Book { title: 'Graph Databases', authors: ['Ian Robinson', 'Jim Webber'] }) // Connect Sally and John as friends CREATE (sally)-[:FRIEND_OF { since: 1357718400 }]->(john) // Connect Sally to Graph Databases book CREATE (sally)-[:HAS_READ { rating: 4, on: 1360396800 }]->(gdb) // Connect John to Graph Databases book CREATE (john)-[:HAS_READ { rating: 5, on: 1359878400 }]->(gdb) 14
  • 15. Graph Databases : Example 15
  • 16. Graph Databases : Example Simple selection from node: Query 1 : How old are Sally? MATCH (sally:Person { name: 'Sally' }) RETURN sally.age as sally_age 16
  • 17. Graph Databases : Example Simple selection from node: Query 2 : Who are the authors of Graph Databases? MATCH (gdb:Book { title: 'Graph Databases' }) RETURN gdb.authors as authors 17
  • 18. Graph Databases : Example Selection using relationship: Query 3 : Who are sally's friends? MATCH (sally:Person { name: 'Sally' }) MATCH (sally)-[r:FRIEND_OF]-(person) RETURN person.name as sally_friend 18
  • 19. Graph Databases : Example Selection using relationship and group function: Query 4 : What is the average rating of Graph Databases? MATCH (gdb:Book { title: 'Graph Databases' }) MATCH (gdb)<-[r:HAS_READ]-() RETURN avg(r.rating) as average_rating 19
  • 20. Graph Databases : Example Using order and limit in query: Query 5 : Who Read Graph Databases First, Sally or John? MATCH (people:Person) WHERE people.name = 'John' OR people.name = 'Sally' MATCH (people)-[r:HAS_READ]->(gdb:Book { title: 'Graph Databases' }) RETURN people.name as first_reader ORDER BY r.on LIMIT 1 20
  • 21. Graph Databases : Example Visual Modeling 21 Name : John Age : 27 FRIEND_OF Name : Sally Age : 32 Name : Alain Age : 19 Since : 01/09/2013 Since : 01/09/2013 FRIEND_OF Since : 01/11/2014
  • 22. Graph Databases : Example Completing our schema // Create Alain CREATE (alain:Person { name: 'Alain', age: 19 }) // Connect Sally and Alain as friends MATCH (alain:Person { name: 'Alain' }) MATCH (sally:Person { name: 'Sally' }) CREATE (sally)-[:FRIEND_OF { since: 1358818400 }]->(alain) 22 Alain Sally John GDB book
  • 23. Graph Databases : Example Node / relationship navigation: Query 6 : Which is shared between Alain and John Friend? MATCH (alain:Person { name: 'Alain' }) MATCH (john:Person { name: 'John' }) MATCH (alain)-[:FRIEND_OF]-(person)-[:FRIEND_OF]-(john) RETURN person.name as friend 23
  • 24. Graph Databases : Example Update node’s properties: Query 7 : Change Alain name to Larry MATCH (n { name: 'Alain' }) SET n.name = 'Larry' Query 8 : Remove property MATCH (n { name: 'Larry' }) SET n.name = NULL Query 9 : Add property MATCH (n { name: 'John' }) SET n += { hungry: TRUE , position: 'Entrepreneur' } 24
  • 25. RDF Databases The principle of the web 25 HTTP Request HTTP Response URL : http://website.com Communication protocol : HTTP Representation language : HTML
  • 26. RDF Databases Changing status 26 URL URI IRI Uniform Resource Locator Uniform Resource Identifier International Resource Identifier http://website.com http://animals.com#lion http://‫.الحيوانات‬tn#lion
  • 28. RDF Databases RDF Resource Description Framework 28 means : pages, person, animals Idea,… : attributes, characteristics, Relationship,… : Model, language and syntax to build description
  • 29. RDF Databases Data model & syntax Description : (Subject, Predicate, object) “example : doc.html is created by John and belongs to the music theme” 29 Doc.html is created by John Doc.html belongs to music theme
  • 30. RDF Databases Data model & syntax (Subject, Predicate, object) (Vertex, edge, Vertex) 30 John Doc.html Music Author Theme
  • 31. RDF Databases Labeled graph with URI and literals 31 http://www.website.com/john#me http://www.website.com/doc.html Music http://www.website.com/schema#author http://www.website.com/schema#theme
  • 32. RDF Databases RDF Syntaxes XML, Turtle, TriG, JSON-LD,… Turtle syntax @prefix rdf : <http://www.w3.org/1999/02/22-rdf-syntax-ns#> @prefix site : <http://www.website.com/schema#> <http://www.website.com/doc.html> site:author <http://www.website.com/john#me>; site:theme "Music". 32
  • 33. RDF Databases SPARQL Protocol And RDF Query Language • Syntax similar to SQL SELECT data, FROM data source WHERE { conditions } 33
  • 34. RDF Databases SPARQL Protocol And RDF Query Language ?x rdf:type ex:Person Get all person SELECT ?subject ?property ?value WHERE { ?subject ?property ?value } Get the full Graph database SELECT ?x WHERE { ?x rdf:type ex:Person . ?x :name ?name . } Get all person who have a name 34
  • 35. RDF Databases SPARQL Protocol And RDF Query Language Declaring prefixes PREFIX esen : <http://esen.tn#> SELECT ?student WHERE { ?student esen:registeredAt ?x. } 35
  • 36. RDF Databases SPARQL Protocol And RDF Query Language Optional pattern PREFIX foaf : <http://xmlns.com/foaf/0.1> SELECT ?person ?name WHERE { ?person foaf:homepage <http://john.info> . OPTIONAL { ?person foaf:name ?name .} } name : unbound 36
  • 37. RDF Databases SPARQL Protocol And RDF Query Language Union PREFIX foaf : <http://xmlns.com/foaf/0.1> SELECT ?name WHERE { ?person foaf:name ?name . { {?person foaf:homepage <http://john.info> .} UNION {?person foaf:homepage <http://paul.info> .} } } 37
  • 38. RDF Databases SPARQL Protocol And RDF Query Language Minus PREFIX ex : <http://website.com#> SELECT ?person WHERE { { ?person rdf:type ?type } MINUS { ?person rdf:type ex:student } } 38
  • 39. RDF Databases Use case : rich snippets Google 39 <div xmlns:v="http://rdf.data-vocabulary.org/#" typeof="v:Person"> My name is <span property="v:name"> Pierre Dumoulin</span>. My personal homepage: <a href="http://www.example.com" rel="v:url" > www.homepage.com</a>I’m living is <span rel="v:address" typeof="v:address"> <span property="v:street-address">12 street name</span> <span property="v:locality">city name</span> ,<span property="v:region">XY</span> <span property="v:postal-code">12345</span>. <span> </div>
  • 40. Application example (RDF) Data storage # Default graph (stored at http://example.org/foaf/aliceFoaf) @prefix foaf: <http://xmlns.com/foaf/0.1/> . _:a foaf:name "Alice" . . _:b foaf:mbox <mailto:[email protected]> . . _:a foaf:mbox <mailto:[email protected]> . Query PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name FROM <http://example.org/foaf/aliceFoaf> WHERE { ?x foaf:name ?name } 40 Name Alice Result
  • 41. Application example (Neo4J) Question : Who is older, Sally or John? 41 Name : John Age : 27 FRIEND_OF Name : Sally Age : 32 Name : Alain Age : 19 Since : 01/09/2013 Since : 01/09/2013 FRIEND_OF Since : 01/11/2014
  • 42. Application example (Neo4J) Who is older, Sally or John? MATCH (people:Person) WHERE people.name = 'John' OR people.name = 'Sally' RETURN people.name as oldest ORDER BY people.age DESC LIMIT 1 42
  • 43. Scientific article Title : Querying RDF Data from a Graph Database Perspective Book title : The Semantic Web: Research and Applications Pages : 346-360 Online ISBN : 978-3-540-31547-6 Series Volume : 3532 Publisher : Springer Berlin Heidelberg Copyright : 2005 Authors : Renzo Angles Claudio Gutierrez 43
  • 44. Scientific article MODEL LEVEL DATA COMPLEXITY CONNECTIVITY TYPE OF DATA Network physical simple high homogeneous Relational logical simple low homogeneous Semantic user simple/medium high homogeneous Object-O logical/physical complex Medium heterogeneous XML logical medium medium heterogeneous RDF logical medium high heterogeneous 44 Table 1 : Summary of comparison among different database models
  • 45. Scientific article PROPERTY G G+ GraphLog Gram GraphDB Lorel F-G Adjacent nodes +/- √ √ √ +/- √ +/- Adjacent edges +/- √ √ √ +/- √ +/- Degree of a node X √ √ x ? X x Path √ √ √ √ √ √ √ Fixed-length Path √ √ √ √ √ √ √ Distance between two nodes X √ √ X ? x x Diameter x √ √ X ? x X 45 Table 2 : Support of some graph database query languages for the example graph properties
  • 46. Scientific article PROPERTY RQL SeRQL RDQL Triple N3 Versa RxPath Adjacent nodes +/- +/- +/- +/- +/- +/- X Adjacent edges +/- +/- +/- +/- X x X Degree of a node +/- x x x x x X Path x x x x X x +/- Fixed-length Path +/- +/- +/- +/- +/- X +/- Distance between two nodes x x x x x x X Diameter x x x x x x x 46 Table 3 : Support of some current RDF query languages for some example graph properties
  • 47. Conclusion • Using Graph database for storing data in graph form or in hierarchical tree structure. • Graph database : Performance, Agility, Flexibility • The shortest path 47
  • 48. Bibliography [1] Ian Robinson, Jim Webber, and Emil Eifrem.«Graph Databases».O’REILLY, 2013. [2] Serge Miranda, Fabien Gandon. «Des Bases de Données à Big Data». Course at Nice Sophia university, MOOC, 2015. [3] Michel Domenjoud. «Bases de données graphes : un tour d’horizon». Available on <http://blog.octo.com/bases-de-donnees-graphes-un-tour-dhorizon> (consulted 18/02/2015). [4] Neo4J community. «Cypher Query Language». Available on <http://neo4j.com/developer/data-modeling/> (consulted 18/02/2015). [5] Frank Manola, Eric Miller, Brian McBride. «RDF 1.1 Primer». Available on <http://www.w3.org/TR/2014/NOTE-rdf11-primer-20140225/> (consulted 18/02/2015). [6] Eric Prud'hommeaux, Andy Seaborne. «SPARQL Query Language for RDF». Available on <http://www.w3.org/TR/rdf-sparql-query/> (consulted 18/02/2015). [7] Neo4J community. «Introduction to graph databases webinar». Available on <http://www.neo4j.org/learn/videos_webinar> (consulted 18/02/2015). 48
  • 49. 49 Thanks for your attention

Editor's Notes

  • #2: Bonjour à tous et vous êtes les bienvenu. Ajoujourd’hui nous vous presenterons notre projet qui s’articule autours des bases de données orientées graphe et des base de données RDF dans le contexte du cours base de données avancée. Cette présentation est élaborée par moi même nassim bahri et Nabila hosni qui malheureusement n’a pas pu assister avec nous ajourd’hui. Commençons par présenter les axes importants de notre projet
  • #4: Face à l’explosion du volume d’information on s’est retrouvé à gérer une grande masse de données dont la structure devient de plus en plus complexe. Pour faire face à cette problématique, un nouveau domaine technologique a vu le jour ; c’est qu’on appelle les « Big Data » Ce domaine vise à proposer une alternative aux solutions traditionnelles de gestion des bases de données et d’analyse. Parmi les technologies utilisées dans ce domaine nous pouvons citer le stockage des données en mémoire (accélérer le temps de traitement des requêtes) ou bien l’utilisation des bases de données réparties qui permet de distribuer le traitement sur plusieurs serveurs et enfin le fameux NOSQL. Ce terme désigne une catégorie des SGBD qui n’est plus fondée sur l’architecture classique de base relationnelle. C’est à dire que l’unité logique de stockage des données n’est plus la table et les données ne sont en général pas manipulées par le langage SQL.
  • #5: 1-Ce modèle est modélisé sous la forme d’une collection de pair clé-valeur, basé sur un document publié par Amazon. 2-Ce modèle est basé sur des tables géantes et des familles de colonnes (chaque ligne peut avoir son propre schéma), basé un document publié par Google 3-Les données seront stockées dans des fichiers dans un format bien déterminé (json) 4-Inspiré de la théorie des graphes, basé sur un système de nœud et liaison aussi l’utilisation des pairs clé valeur.
  • #6: La question qui se pose à ce moment : quel model doit-on choisir ? Et qu’est ce fait la différence entre un modèle et un autres ? Pour répondre à cette question, nous présentons ces quatre modèle dans une matrice avec comme axe : la capacité de stockage (taille des données) et la complexité des données manipulées.
  • #7: Une base de données orientée graphe est une base de données orientée objet utilisant la théorie des graphes,
  • #8: Dans la base de données en graph trois points clés que nous devons connaître : 1-La première chose consiste à identifier les entités qui seront représentées par des nœuds : c’est l’équivalent des tables dans les BDR et des objets dans les BDOO, 2-Par la suite, nous devons identifier les relations entre les différents nœuds : dans le modèle relationnel c’est le faite de faire la jointure entre les différentes tables de même pour les BDOO, 3-Le dernier point, c’est les propriétés qui seront présentées par une paire clé-valeur et qui s’applique sur les nœuds et sur les relations.
  • #9: 1-Le raison majeure qui nous amène à choisir les bases de données en graph c’est leur performance. Contrairement aux bases de données relationnelles dont la performance diminue en augmentant la taille des données, les bases de données en graph se caractérisent par une performance stable. 2-Le second point fort des bases de données en graph c’est qu’ils sont naturellement additif, c’est-à-dire qu’on peut ajouter des nouveaux type de nœuds, de relations et même des sous-graph sans perturber le comportement de notre base. 3-Lorsqu’on dit agilité, on dit un processus itératif et incrémental. Les bases de données en graph nous permet de construire notre schéma de base de données me manière itérative en en ajoutant les nœuds et les relations au fur et au mesure en plus nous offre une API de programmation et un langage de requête.
  • #10: Dans le cas d’une modélisation relationnelle, l’exécution de cette requête nécessite de faire 3 parcours d’indexe qui sont optimisé en fonction des indexes et des clés étrangères déclarées.
  • #11: Dans le cas d’une modélisation en graph, l’exécution de la requête nécessite de faire un seul parcours d’index (pour trouver la société Google), puis un parcours par pointeur physique des relations dans le graphe. Cet exemple reste extrêmement simple, mais met en évidence un cas d’usage sur lequel une base graphe s’avérera logiquement plus performante qu’une base relationnelle.
  • #12: Les bases de données en graph correspondent à tous système de stockage fournissant une adjacence des éléments voisins sans indexation. Tous voisin d’une entité est accessible par un pointeur physique.
  • #13: Il existe pas mail de système de gestion des bases de données orientées graphe: ceux qui propose un stockage native et ceux qui utilisent leurs propres système de stockage (relationnel ou autre). Nous avons choisi de présenter le reste des exemples en utilisant Neo4J qui est nativement orienté Graphe en plus il est très bien documenté et possède une communauté active.
  • #26: Passons maintenant à un autre modèle de base de données : Ce sont les bases de données RDF. Mais avant de se lancer dans le vif de ce sujet il faut rappeler quelques notions clés. Le principe connu du web qui permet à des clients se connecter à un serveur web pour récupérer des pages et les afficher sur l'écran. Dans cette architecture il y a 3 composants important: Ces trois composants forment le web
  • #27: Nous avons maintenant un moyen pour identifier les ressources sur le web, il nous faut donc un outil pour décrire ces ressources. C’est-à-dire aller au-delà du texte affiché dans les pages web et notamment décrire ces ressources à travers des données structurées et utilisables directement par des applications. Et pour ce faire nous utilisons le même principe de l’architecture client/serveur du web mais le résultat ne sera pas seulement de type page HTML, mais n’importe quel objet qui se trouve autours de nous.
  • #28: La solution est donc proposée et standardisée par le W3C selon le schéma suivant : Faire des requêtes sur ces données Echanger les schémas de ces données Passons donc au premier étage de notre pile de standardisation qui est le langage RDF
  • #29: Tous ce qui peut avoir une URI On va attacher à ces ressources des description structurés qui peuvent être manipulé et échanger par des applications
  • #31: Ces triplets peuvent être vue comme un graph dont le sujet et l’objet forment les nœud et le prédicat forme la relation entre les nœud adjacent.
  • #32: Comme on est sur le web ces étiquettes ne sont pas des mots libres, mais nous allons utiliser les moyens d’identification sur le web et notamment les URI
  • #33: En plus des modèles, RDF nous propose différents syntaxes pour structurer nos description notamment : Nous avons choisi d’utiliser Turtle qui propose une syntaxe lisible et simple à comprendre
  • #34: En plus des modèles, RDF nous propose différents syntaxes pour structurer nos description notamment : Nous avons choisi d’utiliser Turtle qui propose une syntaxe lisible et simple à comprendre
  • #35: Des motif conjonctifs
  • #48: Le choix entre les différents modèle proposé par la technologie NOSQL dépond vraiment de la taille des données et de la complexité de ces dernières. L’utilisation des base de données orientées graphe sera la meilleur pour stocker des données sous forme de graphe, d’arbre ou de structure hiérarchique. API intégrée permettant d’utiliser certains algorithmes classiques de la théorie des graphes (plus court chemin, Dijsktra, A*, calcul de centralité…)