Secondo le previsioni il 2012 sarà l'anno dei GraphDB. Cosa sono e come possono essere utilizzati in applicazioni Enterprise? Questo talk prenderà in esame i GraphDB, come sono fatti, cosa c'è di diverso rispetto ai DBMS Relazionali, pro e contro, quali standard esistono e sopratutto come mappare un classico dominio Enterprise con un grafo.
What Are The Drone Anti-jamming Systems Technology?
Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta
1. Dal modello Relazionale al Grafo: cosa cambia?
Alfonso Focareta
Alfonso.focareta@gmail.com – Pro-Netics S.p.A. – NuvolaBase ltd
Twitter : @afocareta
2. RDBMS Features
• Born in 1970
• Slow
• Commonly used
• Support SQL language
Nome speaker
Mail speaker – company or community
3. Graph Database (Property Graph)
Graph = (Vertex,Edge)
Nome speaker 3
Mail speaker – company or community
4. Graph
Nome speaker 4
Mail speaker – company or community
5. Graph
An object that contains vertices and edges.
Nome speaker 5
Mail speaker – company or community
6. Vertex
An object that is connected to other objects by edges.
Nome speaker 6
Mail speaker – company or community
7. Edge
An object that connects two vertices.
Nome speaker 7
Mail speaker – company or community
11. 2012:The year of Graph (blogs.forrester.com)
• social media analytics
• marketing campaign optimization
• customer experience fine-tuning
Nome speaker 11
Mail speaker – company or community
12. GraphDb list
• OrientDB
• Neo4j
• Dex
• GiraffeDB
Nome speaker 12
Mail speaker – company or community
13. Document-Graph database with the support of ACID
Transactions, SQL and Native Queries, Asynchronous
Commands, Intents.
Nome speaker 13
Mail speaker – company or community
14. OrientDb - Fast
150.000 documents per second
10 billions of documents per day
Nome speaker 14
Mail speaker – company or community
15. OrientDB – Transactional
Supports ACID Transaction:
• Atomicity
• Consistency
• Isolation
• Durability
Nome speaker 15
Mail speaker – company or community
16. OrientDB – SQL
Supports SQL language with extensions to handle relationships
without JOINs, manage trees and graphs of connected
documents
Nome speaker 16
Mail speaker – company or community
17. OrientDB – Web Ready
• HTTP
• RESTful
• JSON
Nome speaker 17
Mail speaker – company or community
18. OrientDb - Ø config
download, unzip, run!
cut & paste the db
Nome speaker 18
Mail speaker – company or community
19. OrientDB – Portability
• Runs everywhere is available Java® JRE1.5+
• Driver in JAVA, Javascript, C, Php, Ruby, .NET, Python …
Nome speaker 19
Mail speaker – company or community
20. OrientDb – Hooks
similar to triggers catch events against records, database and
transactions implement custom cascade deletion algorithm
enforce constraints
Nome speaker 20
Mail speaker – company or community
21. OrientDB - Free
FREE for any use : Open Source License Apache 2.0
Nome speaker 21
Mail speaker – company or community
22. Example
Classical Business domain : Billing
Objects:
• Bill
• Customer
• Vendor
• Products
Nome speaker 22
Mail speaker – company or community
23. Example Domain
Nome speaker 23
Mail speaker – company or community
24. OrientDB – Create vertex
ODocument product = database.createVertex();
vertex.field(”id", ”1");
vertex.field(”price", 10000);
Vertex.field(“vat type”,10)
vertex.save();
Nome speaker 24
Mail speaker – company or community
25. OrientDB create Edge
ODocument product= database.createVertex();
vertex.field(”id", ”1");
vertex.field(”price", 10000);
Vertex.field(“vat type”,10)
ODocument bill = database.createVertex();
vertex2.field(”id", ”1");
ODocument edge = database.createEdge( product, bill);
edge.field(”number", ”20");
edge.save();
Nome speaker 25
Mail speaker – company or community
26. OrientDB – remove Edge / delete Vertex
database.removeEdge( edge )
database.removeVertex( vertex )
Nome speaker 26
Mail speaker – company or community
27. Demo
Nome speaker 27
Mail speaker – company or community
28. ThinkerPop
proposes standards for the world of GraphDB through the
development of open source projects
Nome speaker 28
Mail speaker – company or community
29. ThinkerPop - Blueprints
Blueprints is a collection of interfaces, implementations,
ouplementations, and test suites for the property graph data
model.
Blueprints is analogous to the JDBC, but for graph databases.
Nome speaker 29
Mail speaker – company or community
30. BluePrints - Example
Graph graph = new OrientGraph("/tmp/my_graph");
Vertex a = graph.addVertex(null);
Vertex b = graph.addVertex(null);
a.setProperty("name","marko");
b.setProperty("name","peter");
Edge e = graph.addEdge(null, a, b, "knows");
e.setProperty("since", 2006);
graph.shutdown();
Nome speaker 30
Mail speaker – company or community
31. ThinkerPop - Gremlin
Gremlin is a graph traversal language used for graph query,
analysis, and manipulation.
Nome speaker 31
Mail speaker – company or community
34. Dal modello Relazionale al Grafo: cosa cambia?
Alfonso Focareta
alfonso.focareta@gmail.com
Pro-Netics S.p.A. - Team Leader/Senior Developer
NuvolaBase Ltd – Software Engineer
Twitter : @afocareta