Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Neo4j: is it a in-memory graph database?

I have worked with bit older version of Neo4j i.e. 1.8.x. both embedded and REST mode. but I never heard that it store data in-memory. Recently I've been through Neo4j page which says 3 different type of access to neo4j viz:

  1. neo4j server i.e. REST mode
  2. embedded mode
  3. in-memory

How Neo4J works with data in-memory ? and when it was implemented ? was it there from older version i.e. 1.8.x ? or just added in newer version ? any additional changes required in configuration such as Spring data neo4j ?

My findings
I've heard about in-memory database that they handle most of the task in-memory i.e. RAM. for e.g. VoltDB and Redis. (for optimized performance).

like image 361
A Gupta Avatar asked Aug 25 '14 07:08

A Gupta


People also ask

Is Neo4j in memory database?

Sorry, no, all current versions of Neo4j use on-disk storage for durability, though with a high enough page cache to encompass the entire graph your reads at least will be reading all from memory rather than hitting disk.

What type of database is Neo4j?

Neo4j is a graph database. A graph database, instead of having rows and columns has nodes edges and properties. It is more suitable for certain big data and analytics applications than row and column databases or free-form JSON document databases for many use cases. A graph database is used to represent relationships.

Is Neo4j OLTP or OLAP?

Titan, OrientDB, Neo4j are examples of OLTP tools. OLAP systems instead perform complex analysis (e.g. graph traversal, data aggregation) which involve extremely large graphs.

Is Neo4j a NoSQL database?

1. Neo4j : It is most famous graph database management system and it is also NoSQL database system which is developed by Neo4j, Inc. It is different from Mysql or MongoDB as it has its features that makes it special compared to other Database Management System.


1 Answers

Neo4j features a stripped down variant called ImpermanentGraphDatabase. This one is intended to be used for testing only. E.g. when you develop a graph enabled application your unit tests might use it. It is not recommended to use ImpermanentGraphDatabase for real life scenarios with large amounts of data.

To use ImpermanentGraphDatabase you typically start with TestGraphDatabaseFactory, this one resides in the neo4j-kernel jar with classifier tests, see in the reference manual as well.

Regardless if you're using Neo4j in embedded or server mode, multiple layers of caches get used to make your queries as fast as possible, for details look in the reference manual as well.

To sum up: Neo4j is a transactional, ACID compliant graph database benefitting from your provided amount of RAM by caching. But I won't consider this being a in-memory database.

like image 134
Stefan Armbruster Avatar answered Oct 18 '22 14:10

Stefan Armbruster