Learning Neo4j 3.x(Second Edition)
上QQ阅读APP看书,第一时间看更新

Made for online transaction processing

The mentioned characteristics help with systems where you really need to return data from the database management system in an online system environment. This means that the queries that you want to ask the database management system will need to be answered in the TimeSpan between a web request and web response. In other words, in milliseconds, not seconds, let alone minutes.

This characteristic is not required of every database management system. Many systems actually only need to reply to requests that are first fired off and then require an answer many hours later. In the world of relational database systems, we call these analytical systems. We refer to these two types of systems as Online Transaction Processing (OLTP) and Online Analytical Processing (OLAP). There's a significant difference between the two--from a conceptual as well as technical perspective. So let's compare the two in the following table:

At the time of writing this, Neo4j is clearly in the OLTP side of the database ecosystem. This does not mean that you cannot do any analytical tasks with Neo4j. In fact, some analytical tasks in the relational world are run for more efficiently on a graph database (see the Sweet spot use cases of Neo4j section that follows later in this chapter), but it is not optimized for it. Typical Neo4j implementation recommendations would also suggest that you put aside a separate Neo4j instance for these analytical workloads so that it does not impact your production OLTP queries. In the future, Neo Technology plans to make further enhancements to Neo4j that make it even more suited for OLAP tasks.