Home »
MCQs
Neo4j Multiple-Choice Questions (MCQs)
Neo4j is a graph database management system developed by Neo4j Inc. Described by its developers as an ACID-compliant transactional database with native graph storage and processing. (Read more at Wikipedia).
Neo4j MCQs: This section contains multiple-choice questions and answers on the various topics of Neo4j. Practice these MCQs to test and enhance your skills on Neo4j.
List of Neo4j MCQs
1. Neo4j is a which type of NoSQL database?
- Document-oriented database
- Graph database
- Key-value pair database
Answer: B) Graph database
Explanation:
Neo4j is a graph-based database.
Discuss this Question
2. Is Neo4j open-source?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, the Neo4j framework is open-source.
Discuss this Question
3. Neo4j is developed using which of the following language?
- Java
- Python
- C
- C++
Answer: A) Java
Explanation:
Neo4j is developed using Java language.
Discuss this Question
4. Does Neo4j supports ACID properties?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, Neo4j supports full ACID properties.
Discuss this Question
5. Neo4j supports which of the following JAVA API?
- Cypher API
- Native Java API
- Both
Answer: C) Both
Explanation:
Neo4j supports two kinds of Java API: Cypher API and Native Java API.
Discuss this Question
6. ____ is a strong declarative query language provided by Neo4j.
- Hive
- Cypher
- Native
- None
Answer: B) Cypher
Explanation:
Cypher is a strong declarative query language provided by Neo4j.
Discuss this Question
7. Does Neo4j support indexes?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, Indexes are supported by Neo4j via Apache Lucence.
Discuss this Question
8. Neo4j can work with Rest API?
- True
- False
Answer: A) True
Explanation:
Neo4j can work with REST API for use with programming languages like Java, Spring, and Scala.
Discuss this Question
9. In the property graph model nodes are represented using ____?
- Oval
- Arrow
- Circles
- Rectangle
Answer: C) Circles
Explanation:
In the property graph model nodes are represented using circles.
Discuss this Question
10. In the property graph model relationships are represented using ____?
- Oval
- Arrow keys
- Circles
- Rectangle
Answer: B) Arrow keys
Explanation:
In the property graph model relationships are represented using arrow keys.
Discuss this Question
11. Relationships are ____.
- Unidirectional
- Bidirectional
- Both
- None
Answer: C) Both
Explanation:
Relationships are of both directions i.e., unidirectional and bidirectional.
Discuss this Question
12. Relationships in the Property Graph Data Model should be ____?
- directional
- Non-directional
Answer: A) directional
Explanation:
Relationships in the Property Graph Data Model should be directional.
Discuss this Question
13. Relationships in Neo4j should be ____?
- directional
- Non-directional
Answer: A) directional
Explanation:
Relationships in Neo4j should be directional.
Discuss this Question
14. Do we need any additional SQL database to store Neo4j database data?
- Yes
- No
Answer: B) No
Explanation:
The data in Neo4j Graph Database is stored in Nodes and Relationships. To store Neo4j database data, we don't require any extra RRBMS databases or SQL databases.
Discuss this Question
15. What is GPE?
- Graph programming engine
- Graph program engine
- Graph processing engine
- All of the above
Answer: C) Graph processing engine
Explanation:
GPE stands for Graph processing engine.
Discuss this Question
16. Which of the following are the main building blocks of the graph DB data model?
- Nodes
- Relationships
- Properties
- All of the above
Answer: D) All of the above
Explanation:
The main building blocks of the graph DB data model are:
- Nodes
- Relationships
- Properties
Discuss this Question
17. A ____ is a key-value pair used to define Graph Nodes and Relationships?
- Relationships
- Nodes
- Property
- Labels
Answer: C) Property
Explanation:
A property is a key-value pair used to define Graph Nodes and Relationships.
Discuss this Question
18. ____ link two nodes?
- Relationships
- Nodes
- Property
- Labels
Answer: A) Relationships
Explanation:
Relationships link two nodes.
Discuss this Question
19. A node or relationship can have only one label?
- True
- False
Answer: B) False
Explanation:
A node or relationship can have one or more labels.
Discuss this Question
20. CQL stands for ____?
- Cypher Query Language
- Cypher Quitting Language
- Cypher Question Language
- Cypher Query Linguistic
Answer: A) Cypher Query Language
Explanation:
CQL stands for Cypher Query Language.
Discuss this Question
21. Does Neo4j CQL commands support clauses like WHERE or ORDERBY?
- Yes
- No
Answer: A) Yes
Explanation:
Neo4j CQL supports various clauses, such as WHERE, ORDER BY, and so on, making it possible to build quite sophisticated queries in a simple manner.
Discuss this Question
22. Which of the following clause is used to do a pattern search on the data?
- WHERE
- SEARCH
- START
- MATCH
Answer: D) MATCH
Explanation:
The MATCH clause is used to do a pattern search on the data.
Discuss this Question
23. Is the MATCH clause and OPTIONAL MATCH clause both the same?
- Yes
- No
Answer: B) No
Explanation:
The only difference between an optional match and a match is that it can utilize nulls in the event of missing sections of the pattern.
Discuss this Question
24. When importing data from CSV files, ____ clause is utilized.
- LOAD
- LOAD CSV
- CSV
- CSV LOAD
Answer: B) LOAD CSV
Explanation:
When importing data from CSV files, the LOAD CSV clause is utilized.
Discuss this Question
25. Which clause is used to locate the beginning points using legacy indexes?
- BEGIN
- STARTOVER
- START
- FOREMOST
Answer: C) START
Explanation:
The START clause is used to locate the beginning points using legacy indexes.
Discuss this Question
26. Which of the following clause specifies where to begin to include the rows in the output?
- START
- BEGIN
- OVER
- SKIP
Answer: D) SKIP
Explanation:
SKIP clause specifies where to begin to include the rows in the output.
Discuss this Question
27. Which clause is used to convert a list into a row series?
- UNWIND
- WITH
- UNION
- CALL
Answer: A) UNWIND
Explanation:
UNWIND clause is used to convert a list into a row series.
Discuss this Question
28. Which of the following clause combines the results of many queries?
- UNWIND
- UNION
- ALL
Answer: B) UNION
Explanation:
UNION clause combines the results of many queries.
Discuss this Question
29. The ____ clause in Neo4j can be used to construct a node?
- CREATE
- NEW
- BUILD
- CONSTRUCT
Answer: A) CREATE
Explanation:
The CREATE clause in Neo4j can be used to construct a node.
Discuss this Question
30. Suppose you want to construct multiple nodes then which of the following syntax you will use?
- CREATE (node1);(node2)
- CREATE (node1)and (node2)
- CREATE (node1),(node2)
- CREATE (node1):(node2)
Answer: C) CREATE (node1),(node2)
Explanation:
CREATE (node1),(node2) is the correct syntax if you want to construct multiple nodes.
Discuss this Question
31. What is the syntax for generating a labeled node in Cypher Query Language?
- CREATE (node:label)
- CREATE_node:label
- CREATE (node;label)
Answer: A) CREATE (node:label)
Explanation:
CREATE (node:label), is the correct syntax for generating a labeled node in Cypher Query Language.
Discuss this Question
32. Which of the following is the correct syntax to create a relationship?
- CREATE (node1)-(:RelationshipType)->(node2)
- CREATE (node1)-([:RelationshipType])->(node2)
- CREATE (node1)-(:RelationshipType);>(node2)
- CREATE (node1)-[:RelationshipType]->(node2)
Answer: D) CREATE (node1)-[:RelationshipType]->(node2)
Explanation:
CREATE (node1)-[:RelationshipType]->(node2), is the correct syntax.
Discuss this Question
33. ____ command is a combination of CREATE command and MATCH command.
- UNION
- UNWIND
- COMBINE
- MERGE
Answer: D) MERGE
Explanation:
The MERGE command is a mixture of the CREATE and MATCH commands.
Discuss this Question
34. Suppose the MERGE command searches for a given pattern in the graph what will happen if it does not exist in the graph?
- It will show you the ERROR
- It will show no result
- It generates a new node/relationship and returns the outcomes.
- All of the above
- None
Answer: C) It generates a new node/relationship and returns the outcomes.
Explanation:
The Neo4j CQL MERGE command searches the graph for a particular pattern. It returns the results if it exists. It generates a new node/relationship and delivers the results if it does not exist in the graph.
Discuss this Question
35. You may add a new property to a node by using the ____ clause.
- WITH
- NEW
- SET
Answer: C) SET
Explanation:
You may add a new property to a node by using the SET clause.
Discuss this Question
36. The ____ clause is used to remove graph elements' properties and labels.
- REMOVE
- DELETE
- DEL
- DELETE_ALL
- CLEAR
Answer: A) REMOVE
Explanation:
The REMOVE clause is used to remove graph elements' properties and labels.
Discuss this Question
37. The ____ clause is used to eliminate nodes and relationships from a database.
- REMOVE
- DELETE
- DEL
- ERASE
- CLEAR
Answer: B) DELETE
Explanation:
The DELETE clause is used to eliminate nodes and relationships from a database.
Discuss this Question
38. Which of the following statement is correct?
- The DELETE operation is used to delete nodes and relationships.
- The REMOVE operation is used to delete nodes and relationships.
- The ERASE operation is used to delete nodes and relationships.
Answer: A) The DELETE operation is used to delete nodes and relationships.
Explanation:
STATEMENT 1 is correct, The DELETE operation is used to delete nodes and relationships.
Discuss this Question
39. Which of the following statement is correct?
- To remove labels and properties, use the DELETE operation.
- To remove labels and properties, use the ERASE operation.
- To remove labels and properties, use the REMOVE operation.
Answer: C) To remove labels and properties, use the REMOVE operation.
Explanation:
STATEMENT 3 is correct, To remove labels and properties, use the REMOVE operation.
Discuss this Question
40. To count the number of rows, the ____ function is utilized.
- TOTAL()
- SUM()
- COUNT()
Answer: C) COUNT()
Explanation:
To count the number of rows, use the count() function.
Discuss this Question
41. Can you use the COUNT function to count the groups of relationship types?
- Yes
- No
Answer: A) Yes
Explanation:
The COUNT function is also used to count the different sorts of relationships.
Discuss this Question
42. Can you return the relationship using the return clause?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, we can also return the relationship using the return clause.
Discuss this Question
43. How many types of object caches are there in Neo4j?
- 2
- 3
- 4
- 5
Answer: A) 2
Explanation:
There are two types of Object Cache:
- Reference Cache
- High-Performance Cache(HPC)
Discuss this Question
44. Each relationship contains only the START node and END node?
- Yes
- No
Answer: B) No
Explanation:
Each relationship contains a START node, an END node, and FROM node.
Discuss this Question
45. Which of the following aggregate function are used in Neo4j?
- SUM
- MIN
- MAX
- COUNT
- AVG
- All of the above
Answer: F) All of the above
Explanation:
Following aggregate functions are used in Neo4j:
Discuss this Question
46. Which of the following command is used to create an index?
- CREATE NEW INDEX
- CREATE
- CREATE INDEX
Answer: C) CREATE INDEX
Explanation:
CREATE INDEX command is used to create an index in Neo4j.
Discuss this Question
47. Which of the following command is used to Delete an existing index?
- DROP INDEX
- DELETE INDEX
- DEL INDEX
- REMOVE INDEX
Answer: A) DROP INDEX
Explanation:
DROP INDEX command is used to Delete an existing index.
Discuss this Question
48. Which of the following companies are using Neo4j?
- IBM
- Ebay
- NASA
- Walmart
- All of the above
Answer: E) All of the above
Explanation:
Following companies are using Neo4j:
- IBM
- Ebay
- NASA
- Walmart
- UBS
Discuss this Question
49. To eliminate an existing Unique constraint from a node or relationship property, which of the following command is employed?
- DROP CONSTRAINT UNIQUE
- DROP UNIQUE
- DELETE CONSTRAINT
- DROP CONSTRAINT
Answer: D) DROP CONSTRAINT
Explanation:
To eliminate an existing Unique constraint from a node or relationship property, use the "DROP CONSTRAINT" command.
Discuss this Question
50. Like SQL, Does the Neo4j database also supports UNIQUE constraint on node or relationship properties?
- Yes
- No
Answer: A) Yes
Explanation:
The Neo4j database, like SQL, implements the UNIQUE constraint on node or relationship characteristics.
Discuss this Question
51. Which of the following is used to put comments in Neo4j?
- /*…./*
- //
- ~~
Answer: B) //
Explanation:
// are used to put comments in Neo4j.
Discuss this Question
52. A node is represented by a pair of ____ in Cypher?
- Curly brackets
- Square brackets
- Parentheses
Answer: C) Parentheses
Explanation:
A node is represented by a pair of parentheses in Cypher.
Discuss this Question
53. Cypher uses a pair of dashes (--) to represent an ____ relationship.
- Undirected
- Directed
Answer: A) Undirected
Explanation:
Cypher uses a pair of dashes (--) to represent an undirected relationship.
Discuss this Question