12. Why Graph DB?
Insufficient RDBMS performance in hierarchical
structures. The graph database storage shines
when storing richly-connected data. Querying is
performed through traversals, which can
perform millions of traversal steps per second. A
traversal step resembles a join in a RDBMS.
13. SQL addons
Some DBs has even special DSL:
SELECT empno,
ename,
job,
mgr,
hiredate,
LEVEL
FROM emp
WHERE LEVEL <= 2
START WITH mgr IS NULL
CONNECT BY PRIOR empno = mgr
14. Where Graph DB
• Network Management
• Master Data Management
• Social
• Finance
• Spatial
– Map Routing
• Bio
15. Why Neo4J?
• true ACID transactions
• high availability
• scales to billions of nodes and relationships
• high speed querying through traversals
• well documented
• Java
• licenses
16. Why neo4j - details
• Disk ready
– Native graph storage engine with custom (SSD-
ready) binary on-disk format
• Transactional
– JTA/JTS, XA, 2PC, Tx Recovery, deadlock detection
…
• Scalable
– Billions of nodes on single JVM
17. Access & Implementation Types
1. EmbeddedGraphDatabase: just to local JVM
2. RestGraphDatabase: rest-binding
3. HighAvaibleGraphDatabase: uses Zookeeper
18. When Grails shines
Ruby platform isn’t a case, Java is too expensive,
Scala is too smart.
Startups & prototypes
Model-driven architecture where GORM is
fundament.
19. Groovy & Grails Architecture
Controller
View GSP Service Domain
Plug-in
Gant
GORM
Site Mesh Spring Hibernate
DB
Java EE Groovy
JVM
26. Properties
name:staff
type:weapon
name:Splinter
fullName:Hamato Yoshi
type: rat
type: interact
type:knows
27. Mapping
Reference Node
Subreference
Domain Class/Type
SubreferenceNode
Domain Class Instance
Instance
Domain Class
Properties
Instance
Properties
Assocoation
28. Compatibility with GORM
✔ ✗
Simple persistence methods HQL queries
Dynamic finders Dirty checking methods
Criteria queries Composite primary keys
Named queries Any direct interaction with the Hibernate API
Inheritance Custom Hibernate user types
Embedded types
Query by example
Many-to-many associations (these can be
modelled with a mapping class)