Introduction to Graph Data Management
Claudio Gutierrez
Center for Semantic Web Research (CIWS) Department of Computer Science Universidad de Chile EDBT Summer School – Palamos 2015
Introduction to Graph Data Management Claudio Gutierrez Center for - - PowerPoint PPT Presentation
Introduction to Graph Data Management Claudio Gutierrez Center for Semantic Web Research (CIWS) Department of Computer Science Universidad de Chile EDBT Summer School Palamos 2015 Joint Work With Renzo Angles Universidad de Talca, Chile
Center for Semantic Web Research (CIWS) Department of Computer Science Universidad de Chile EDBT Summer School – Palamos 2015
Jan Hidders Alexandra Poulovassilis
Graph Theory (R. Diestel)
Orders
Networks: An Introduction (M. Newman) 1. Introduction 2. Technological Netowrks 3. Social Networks 4. Networks of information 5. Biological Networks 6. Mathematics of Networks 7. Measures and Methods 8. The large-scale structure of networks 9. Basic concepts of algorithms
distribution
Seems like we are in Linnean times: lots of arbitrary animals collected and discovered, but no way of making sense of this diversity Either: we are not understanding graphs
graphs are not understandable by XXI’s century humans
we do not know what we are looking for …
Graphs Relations
Language Define Source Extract Transform Construct SQL FROM WHERE SELECT SPARQL FROM, Service pattern matching
Select, ASK, Contruct, Datalog match facts rules head XQuery XSLT …
Exercise: Fill in the blanks; add your favorite language
SELECT ASK CONSTRUCT DESCRIBE Query Form Dataset Clause Where Clause (Graph Pattern)
Triple pattern
FROM FROM NAMED
Dataset FILTER OPTIONAL AND UNION
X Y Z X Y
TRUE - FALSE
MATCH (p:Person)-[:Knows]->(friend) WHERE p.age = 20 WITH p, count(friend) as friends WHERE friends > 0 RETURN p.name, friends
Basic syntax
nodes having label Person
get nodes of a given type
A node MATCH (p:Person {name:"Tom"}) RETURN p A value MATCH (p:Person {name:"Tom"}) RETURN p.age A list of values MATCH (p:Person) RETURN p.name LIMIT 5 An array MATCH p=shortestPath((a)-[*]->(b)) WHERE a.name="Axel" AND b.name="Tom" RETURN p A list of arrays MATCH p=((a)-[*]->(b)) WHERE a.name="Axel" AND b.name="Frank" RETURN p
Each social application is a consumer/producer of social networks, producing and/or collecting network data, and consuming data produced by other applications. [SNQL, SanMartin,_,Wood]
Data Collection Network Manipulation and Storage
Sharing and Porting Social Networks Data Management (Data Model/DBMS) External Consumers/ Producers Incremental Data Feed Local Consumer/Producer
Application Logic Other Consumers/ Producers Social Network Analysis Tools
Query & Transformation Interactive Data Set Production Integration of Structural Measures
The Web The Web of Data
r
<2> <3>
1
<4>
2
<5>
3
<3> <5>
4 5
Search/Query
<2> <3> <4> 1 2 <3> <5> <5> 3 4 5 href <uri2,q,uri3> <uri1,p,uri2> ...
uri2
<uri1,r,uri4> <uri2,p,uri1> ...
uri1
<uri3,m, uri4> <uri1,n, uri3> ...
uri3
<uri4,t,uri2> ...
uri4 Description of urij
p
q n t m
Native Data Store APIs Data Structure: Graphs RDBMS
MySQL MSQL Oracle DB2 Postgres
Files Applications Services Query languages
X1 X2 … Xn …..
Database model Abstraction level Data structure Information focus Network Physical Pointers,records Records Relational Logical Relations Data, attributes Semantic User Graph Schema, relations OO Physical/logical Objects Objects, methods Semi-structured Logical Tree Data,components Graph Logical/user Graph Data, relations
Data Storage Query Computing model method facilities model Graph database Simple graph Property graph Hypergraph Nested graph Native Non-native Query language API Graph algorithms Single-node Distributed AllegroGraph