• No results found

How graph databases started the multi-model revolution

N/A
N/A
Protected

Academic year: 2021

Share "How graph databases started the multi-model revolution"

Copied!
65
0
0

Loading.... (view fulltext now)

Full text

(1)

How graph databases started

the

multi-model

revolution

Luca Garulli

Author and CEO @OrientDB

(2)

“90% of the data 


in the world today 


has been created 


in the

last two years alone

.”

- IBM

(3)
(4)

Just Data

Order #134 (Order) Luca (Provider) Commodore Amiga 1200 (Product) Jill (Customer) Monitor 40” (Product) Mouse (Product) Bruno (Provider)

Data by itself has little

value, it’s the

relationship

between data that gives it

(5)
(6)

Top NoSQL categories

Key/Value Databases

Document Databases

(7)

Top NoSQL categories

Key/Value Databases

(8)

Why do most NoSQL products

avoid

(9)

Joins is the Evil

ID Name 10 John 11 John 24 Mike 28 Mike ID Address 10 24 10 33 32 44 ID Location 24 Milan 33 London 18 Paris 18 Madrid 44 Moscow

Customer CustomerAddress Address

(10)
(11)

A-­‐Z

A-­‐L M-­‐Z

Imagine  an    

Address  Book  

where  we  want  to  find  

Luca

’s  phone  number

(12)

A-­‐Z A-­‐L M-­‐Z A-­‐L A-­‐D E-­‐L M-­‐Z M-­‐R S-­‐Z

Index  algorithms  are  all  

similar  and  based  on  

balanced  trees

(13)

A-­‐Z A-­‐L M-­‐Z A-­‐L A-­‐D E-­‐L M-­‐Z M-­‐R S-­‐Z A-­‐D A-­‐B C-­‐D E-­‐L E-­‐G H-­‐L

(14)

A-­‐Z A-­‐L M-­‐Z A-­‐L A-­‐D E-­‐L M-­‐Z M-­‐R S-­‐Z A-­‐D A-­‐B C-­‐D E-­‐L E-­‐G H-­‐L E-­‐G E-­‐F G H-­‐L H-­‐J K-­‐L

(15)

Index Lookup: how does it work?

A-­‐Z A-­‐L M-­‐Z A-­‐L A-­‐D E-­‐L M-­‐Z M-­‐R S-­‐Z A-­‐D A-­‐B C-­‐D E-­‐L E-­‐G H-­‐L E-­‐G E-­‐F G H-­‐L H-­‐J K-­‐L Luca

Found!    

This  lookup  took  

5

 steps.  

With  millions  of  indexed  

(16)

Joins Kill Performance

ID Name 10 John 11 John 24 Mike 28 Mike ID Address 10 24 10 33 32 44 ID Location 24 Milan 33 London 18 Paris 18 Madrid 44 Moscow

Customer CustomerAddress Address

Joins are executed every time

you cross relationships

Querying million of records

joining 3-4 tables could

(17)

This is why the database

query performance

suffers as the database

increases in size

(18)
(19)

In a world that’s becoming

more connected, we need a

better way to store data and

manage relationships

(20)

“A graph database is any

storage system

that provides

index-free adjacency

- Marko Rodriguez

(21)

Every developer knows

the Relational Model,

but who knows the

(22)

Back to school:

(23)

Basic Graph

(24)

Vertices  and  Edges  can   have  properties

Vertices  are  directed

*  https://github.com/tinkerpop/blueprints/wiki/Property-­‐Graph-­‐Model

Property Graph Model*

Sao  Paulo  

people:  12,000,000

Luca  

company:   OrientTechnologies

Vertices  and  Edges  can   have  properties Vertices  and  Edges  can  

have  properties

Visited  

(25)

Luca

Sao  Paulo

Visited  

on:  2015

An  Edge  connects  only  2  vertices     Use  multiple  edges  to  represent  1-­‐N  

and  N-­‐M  relationships

Worked  

on:  2015

(26)
(27)

The Graph theory

is so simple,

(28)

How does a

true*

Graph

Database

manage relationships?

(29)

Luca

Sao  Paulo

Visited  

on:  2015

#13:55 #15:99

Each element in the Graph has own immutable Record ID

#22:11

(Edge) (Vertex)

(Vertex)

Each element in the Graph has own immutable Record ID

(30)
(31)
(32)
(33)

A Graph Database creates the

relationship

just once

(when the edge is created)

VS

RDBMS computes the

relationship

every time

(34)

When you move from a RDBMS

to a Graph Database you jump

from a

O(log N)

speed to a near

O(1)

With a Graph Database, the

traversing time is

(35)

Graph Databases Easily Manage Complex

Relationships

No costs to traverse relationships:

• Recommendation engines • Social Applications

• Spatial Apps

(36)
(37)

GraphDB Database Quadrant

R e la ti o n sh ip s C o mp le xi ty > Data Complexity > Relational Key Value Column Graph Document

These were

1st generation

NoSQL

(38)
(39)

Oracle (RDBMS) Redis or Memcache (Key/Value) MongoDB (DocDB) Neo4j (GraphDB) Application ETL

1st Generation NoSQL: Scenario

(40)

1st Generation NoSQL: Fact

In > 90% of use cases,

NoSQL products are

(41)

Oracle (RDBMS) Redis or Memcache (Key/Value) MongoDB (DocDB) Neo4j (GraphDB) Application ETL

1st Generation NoSQL: Problems

- No standard between NoSQL

products

- Multiple vendors = multiple skills

- ETL + synchronization code

(42)

2nd Generation NoSQL

is

(43)

What’s Multi-Model DBMS?

Graph

Document

Object

Key/Value

Multi Model represents the intersection

(44)

What’s Multi-Model DBMS?

Graph

Document

Object

Key/Value

Multi Model represents the intersection

of multiple models in just one product

- Just

one product

to learn and maintain

- Just

one vendor

relationship to manage

- No ETL, no synchronization required

(45)
(46)
(47)

`

Vertices and Edges are Documents

{ ”@rid": “12:382”, ”@class": ”Customer", “name”: “Jill”, “surname” : “Raggio”, “phone” : “+39 33123212”, “details”: { “city”:”London", “tags”:”millennial” } } Jill Order Ma kes

General purpose solution:

JSON

Schema-less

Schema-full

Schema-hybrid

Nested documents

(48)

Polymorphic queries

Luca

(Provider)

Jill

(Customer)

SELECT * FROM Customer

SELECT * FROM Provider

SELECT * FROM Actor

(49)
(50)
(51)
(52)
(53)

There are a few DBMSs that claim

to be Multi-Model, but they do not

have a true Graph Engine.

The “Graph” is only a

layer

on top

of the engine.

(54)

Meet OrientDB

The First Ever Multi-Model

Database Combining Flexibility

of Documents with

(55)

With a true Graph, Document,

(56)

FEATURES ORIENTDB)) MONGODB NEO4J (RDBMS) MYSQL)

Operational Database X X X

Graph Database X X

Document Database X X

Object-Oriented Concepts X

Schema-full, Schema-less, Schema mix X

User and Role & Record Level Security X

Record Level Locking X X X

SQL X X

ACID Transaction X X X

Relationships (Linked Documents) X X X

Custom Data Types X X X

Embedded Documents X X

Multi-Master Zero Configuration Replication X

Sharding X X

Server Side Functions X X X

Native HTTP Rest/ JSON X X

Embeddable with No Restrictions X

(57)
(58)

• Support for

TinkerPop

standard

for Graph DB:

Gremlin

language

and Blueprints API

SQL

+ extensions for graphs

JDBC

driver to connect any BI tool

HTTP/JSON

support

Drivers

in Java, Node.js, Python,

PHP, .NET, Perl, C/C++ and

more

(59)

Availability and Integrity

Atomic, Consistent, Isolated and Durable (ACID)

(60)

Scalability and Performance

Multi-Master Replication, Sharding and

Auto-Discovery to Simplify Ops

(61)

Some numbers

50,000

Downloads per Month from 200+ countries.

70+

Committers contributing to the product

1000s

Users from SMBs to Fortune 10 Companies.

17+

Years of Research have been put in

(62)

A Bright Future

(63)
(64)

Get Started for Free

OrientDB Community Edition is

FREE

for any purpose (

Apache 2 license

)

Udemy Getting Started Training is

★★★★★

and Free

http://www.orientechnologies.com/getting-started

(65)

Thank you.

Ask your questions on Twitter for the

Big Data Panel using

#QCONBIGDATA

Luca Garulli

@lgarulli

References

Related documents

As part of its mandate to serve the best interests of the graphic design industry, the business community and the public, the Association of Registered Graphic Designers

The purpose of this study was to determine the sources of acculturative stress among international students in University Utara Malaysia (UUM) from the international

In October 2004, the Polish gravity control network, containing 354 gravity field stations and 12 stations for absolute gravity measurements, was enlarged by one more absolute

The search algorithm for path planning must produce weld motions that are smooth, collision free, and within the reach of the robot, avoiding singularities and joint

• Expertise in 4 activity sectors of marine industry • 20 high qualified CFD engineers..  Efficient partnership with

MEFYP physical health [Instrument adapted from the National Longitudinal Survey of Youth 1997, the National Health Interview Survey, the Youth Risk Behavior Survey, the Outcomes

server:~# a2enmod rewrite server:~# a2enmod rewrite server:~# a2enmod rewrite server:~# a2enmod rewrite Enabling module rewrite. Enabling

EV 1 CS 3 Local Computing on Charging Planning Cloud Computing on CS’s EEATC GC (Cloud Server) CS’s Local Condition Monitoring 2 4 Mobile Edge Computing MEC Server Mobile