3. Introduction – /me
● Studied computer science at TU-Ilmenau
● 02/2009 – 11/2010 sones core developer of the
sones GraphDB
● GraphQL
● Type-Management
● 11/2010 – 11/2011 sones Head of R&D
● Design of v2
● Refactoring of v1 → v2 (de-facto rewrite)
● 11/2011 – now NoSQL freelancer & visiting lecturer
3
4. Introduction – Current situation
● Data-intensive, complex and distributed applications
● Semantic web
● Recommendation systems
● Social networks
● Similarities
● Strong connected data in large amounts
● Complex structures
● Continuous growth in data volume
● Mix of structured and non-structured (schema-less) data
4
6. Introduction – Challenges
● Recursive connected information as a new design
goal
● Simple management of structured, semi-
structured and unstructured data
● Replication
● Versioning
● Efficient partitioning of data
● Graph oriented operations
6
7. Graph databases – Data model
● Graph G(V,E)
● V – Vertices
● E – Edges
Vertex Vertex
0 1
7
8. Graph databases – Data model
Stuttgart
m 63
3
3k km
38
260 km
Jena Berlin
8
9. Graph databases – Property graph
● Extension of the graph data model
● Additional properties on vertices and edges
● The properties are key/value pairs (Age:23)
● Keys are specified by the schema of the vertex type
Name: Alice Name: Bob
ID: 0
CommunicatesWith ID: 1
Age: 23 Encrypted : true Age: 42
Method : RSA
9
10. Graph databases – Property graph
Name: TU Name: Uni
Ilmenau StudiesIn Stuttgart
Name: Carol
Since: 20
07 ID: 3
Age: 18
Stu ce: 20
Co
Sin
0
En mm
Since: 201
StudiesIn
die
f ter cr
eO S i s yp uni
sIn 4
tiv : te c a
la ree d: t
fa e s W
0
Re eg ls e
D it h
Name: Alice Name: Bob
CommunicatesWith
ID: 0 ID: 1
Encrypted: true
Age: 23 Age: 42
Method: RSA
10
11. Graph databases – Definition
A graph database is a database that uses graph
structures with nodes, edges, and properties to
represent and store information. General graph
databases that can store any graph are distinct from
specialized graph databases such as triplestores
and network databases.
http://en.wikipedia.org/wiki/Graph_database
11
12. Pros – Data model
● Explicit data model
● Direct mapping of real world network
structures
12
13. Pros – Efficient graph traversal
● The most important operation of graph
databases
● Recursive search for vertices/edges with
certain properties
● Finding paths in graphs
● GraphDB is able to do ~80M vertex-
traversals per second
13
14. Pros – Index-free adjacency
● Relations (edges) are directly modeled on the
vertex → no need for an additional mapping
● No need for a global index for relations
● Data locality → adjacent vertices can be
persisted "close together" (efficient storage)
● → The vertex-traversal performance is
independent from the size of the graph
14
15. Cons
● In general the import is slower than in
RDBMS
● Relatively new technology
● Lack of standards
15
16. Use cases
● Rating of websites in search engines –
Page rank
● Who knows-who in social networks –
Shortest path
● Recommendation systems – Bipartite
matching
● ...
16
17. Sones GraphDB – Overview
● http://www.sones.com
● Object-oriented graph database
● Property-Hypergraph data model
● Written in C# (97%)
● C# embedded/remote API
● GraphQL
● Non-persistent OSE and proprietary persistent
GraphFS
17
20. Sones GraphDB – GraphQL
// define Vertex Type
CREATE VERTEX User
ADD ATTRIBUTES (String Name, SET<User> Friends)
INDICES (Name)
// add vertices Alice and Bob
INSERT INTO User VALUES (Name = "Alice", Age = 23)
INSERT INTO User VALUES (Name = "Bob", Age = 42)
// add edges between Alice and Bob
LINK User(Name = ‘Alice') VIA Friends TO User(Name = ‘Bob')
LINK User(Name = ‘Bob') VIA Friends TO User(Name = ‘Alice‘)
20
21. Sones GraphDB – HowTo run it
● Windows: Install Visual Studio (professional
and higher) or MonoDevelop
● Linux: Install mono-complete and MonoDevelop
● Download the source from
https://github.com/cosh/sones
● Open the „CoreDeveloper.sln“
● Have phun
21
22. Sones GraphDB – Documentation
● Blog: http://developers.sones.de/
● Wiki: http://developers.sones.de/wiki/doku.php
● Forum: http://forum.sones.de/
● BugTracking: http://jira.sones.de/
● The fastest way to information: /me :)
22