Home / Interview / Neo4j :: General Questions

Interview :: Neo4j

11) How files are stored in Neo4J?

Neo4J stores graph data in a number of different store files, and each store file contains the data for a specific part of the graph for example relationships, nodes, properties etc.

12) Whjat is the difference between Neo4J Graph Database and MySQL?

Difference between Neo4J and MySQL:

Neo4J MySQL
Neo4J contains vertices and edges. Each vertex or node represent a key value or attribute. In MySQL, attributes are appended in plain table format.
In Neo4J, it is possible to store dynamic content like images, videos, audio etc. In relational databases, such as MySQL, it is difficult to store videos, audios and images.
It provides the capability of deep search into the database without affecting the performance along with efficient timing. It takes longer time for database search and also inconvenient compared to Neo4J.
In Neo4j, two or more objects can be related by making relationship between them. It lacks relationship and very difficult to use them for connected graphs and data.
13) What is CQL? How to execute CQL commands in Neo4J?

CQL stands for Cypher Query Language. The "$" prompt is used to execute all CQL commands in Neo4j.

14) What is object Cache in Neo4J?

In Neo4J, object cache is used to store individual nodes, their relationships and their properties in a form which is optimized for fast traversal of the graph. Reading from object cache is 5 to 10 times faster than reading from the file buffer cache.

15) How can you delete databases in Neo4J?

Delete commands in Neo4J:

Delete a single node:

Delete all nodes and relationships:

Delete a node with its relationship:

Delete relationships only:

16) Is it possible to query Neo4j over the internet?

As such Neo4j got RESTful API, you can query over the web, or you can run it locally. It runs in the Heroku or Cloud.

17) What are the different Neo4J CQL command?

Following the different Neo4J CQL commands:

  • Create
  • Match
  • Delete
  • Merge
  • Set
  • Remove
  • Return etc.
18) What is MATCH command? Where is it used in Neo4J?

MATCH command is used with RETURN or UPDATE clause. It cannot be used alone otherwise it will give error.

Syntax:

The MATCH command cannot be used alone to fetch data from the database otherwise it will show invalid syntax error.

19) What is the use of SET clause in Neo4J?

SET clause is used to add new properties to an existing node or relationship.

20) Is it easy to fragment a Neo4J graph across multiple servers?

It is very difficult to fragment a Neo4J graph across multiple servers.