Top Neo4j interview questions and answers for freshers and experienced.

Neo4j is open source database which gives you certain advantages involving security likelihood of remaining available into the future support options and cost. It is currently the most popular graph database in use.Neo4j is designed to be transnational in nature and acid complaint and it also designed for scalability which means if you need to work with massive data in a distributed environment Neo4j will do that.
There are only three basic items in Neo4j the first is a Node which you think as document that has certain properties and the properties are typically stored in the Key value pairs very similar to document databases such as MongoDB .There are also Edges that in Neo4j are called relationships between the different nodes and those relationships are also store properties, so Neo4j is also described as a Property graph model.

1.What is Neo4j?

Neo4j is one of most popular an open-source NoSQL graph database management system developed by Neo4j, Inc. Neo4j implemented in Java and Scala.The development of Neo4j was started in 2003, it has been publicly available since 2007.The source code and issue tracking of Neo4j are available on GitHub, with support readily available on Stack Overflow and the Neo4j Google group.

Neo4j as a graph database features indexing as the preferred way to find start points for graph traversals. Over the years multiple different indexing approach have been added. The goal of this article is to give an overview on this to avoid confusion esp. for those who just recently got started with Neo4j.

A graph database using a property graph model stores its data in nodes, relationships and properties. In Neo4j 2.0 this model was amended with labels.

Neo4J supports no indexes in the beginning later it started support for manual ,automatic and schema indexes

Read more from about indexing in Neo4J from http://blog.armbruster-it.de/2013/12/indexing-in-neo4j-an-overview/

Materializing of relationships at creation time, resulting in no penalties for complex runtime queries

Constant time traversals for relationships in the graph both in depth and in breadth due to efficient representation of nodes and relationships

All relationships in Neo4j are equally important and fast, making it possible to materialize and use new relationships later on to “shortcut” and speed up the domain data when new needs arise

Compact storage and memory caching for graphs, resulting in efficient scale-up and billions of nodes in one database on moderate hardware

Written on top of the JVM

7.Which query language is used in Neo4j ?

Cypher Query Language is used in Neo4j.Cypher is Neo4j’s open graph query language. Cypher’s syntax provides a familiar way to match patterns of nodes and relationships in the graph.

Simple example of a Cypher query to get cast of movies starting with “T”

MATCH (actor:Person)-[:ACTED_IN]->(movie:Movie)
WHERE movie.title STARTS WITH "T"
RETURN movie.title AS title, collect(actor.name) AS cast
ORDER BY title ASC LIMIT 10;

8.How files are stored in Neo4J?

9.List out the difference between Neo4J Graph Database and MySQL Database ?

10.What is CQL? How can you run CQL commands in Neo4J?

CQL (Cypher Query Language) is a declarative, SQL-inspired language for describing patterns in graphs visually using an ascii-art syntax.It allows us to state what we want to select, insert, update or delete from our graph data without requiring us to describe exactly how to do it. You have to use “$” prompt to run all CQL commands in Neo4j.Image source: https://neo4j.com/developer/cypher-query-language/

11.List different types of object caches in Neo4J?

12.List some features of Neo4J databases ?

Neo4J databases comes with below features

Intuitive, using a graph model for Data representation.

Reliable with full ACID transactions support.

Durable and Fast.

Massively scalable supports up to several billion of nodes/relationships/properties.