Neo4j Graph Database MongoDB Certification Program Practice Exam, Exams of Technology

This practice exam provides a cross-technology evaluation for professionals using both Neo4j and MongoDB, focusing on differences between graph and document data models. Candidates explore hybrid architecture scenarios, data migration design, schema-less document structures, aggregation pipelines, graph traversal logic, and integration patterns. It assesses competency in choosing the right database model for various use cases, optimizing performance, ensuring scalability, and implementing secure, reliable multi-database solutions.

Typology: Exams

2025/2026

Available from 01/06/2026

shilpi-jain-1
shilpi-jain-1 🇮🇳

4.2

(5)

29K documents

1 / 89

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Neo4j Graph Database MongoDB Certification
Program Practice Exam
**Question 1. Which component of the property graph model uniquely identifies a node’s
type?**
A) Relationship type
B) Label
C) Property key
D) Index
Answer: B
Explanation: Labels are attached to nodes to denote their type or category.
**Question 2. In Neo4j, what does “indexfree adjacency” mean?**
A) Nodes are stored without any indexes.
B) Relationships are stored as pointers directly on nodes.
C) All queries automatically use indexes.
D) Data is replicated without indexes.
Answer: B
Explanation: Indexfree adjacency stores direct references to adjacent nodes, enabling fast
traversals without index lookups.
**Question 3. Which of the following is a common use case for graph databases?**
A) Storing large binary files
B) Timeseries sensor data
C) Fraud detection with complex relationship analysis
D) Simple keyvalue caching
Answer: C
Explanation: Graph databases excel at traversing and analyzing intricate relationships, making
them ideal for fraud detection.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59

Partial preview of the text

Download Neo4j Graph Database MongoDB Certification Program Practice Exam and more Exams Technology in PDF only on Docsity!

Program Practice Exam

Question 1. Which component of the property graph model uniquely identifies a node’s type? A) Relationship type B) Label C) Property key D) Index Answer: B Explanation: Labels are attached to nodes to denote their type or category. Question 2. In Neo4j, what does “index‑free adjacency” mean? A) Nodes are stored without any indexes. B) Relationships are stored as pointers directly on nodes. C) All queries automatically use indexes. D) Data is replicated without indexes. Answer: B Explanation: Index‑free adjacency stores direct references to adjacent nodes, enabling fast traversals without index lookups. Question 3. Which of the following is a common use case for graph databases? A) Storing large binary files B) Time‑series sensor data C) Fraud detection with complex relationship analysis D) Simple key‑value caching Answer: C Explanation: Graph databases excel at traversing and analyzing intricate relationships, making them ideal for fraud detection.

Program Practice Exam

Question 4. Which Cypher clause is used to create a node with a label “Person” and a property name “Alice”? A) MATCH (p:Person {name:'Alice'}) B) CREATE (p:Person {name:'Alice'}) C) MERGE (p:Person {name:'Alice'}) D) INSERT (p:Person {name:'Alice'}) Answer: B Explanation: CREATE creates a new node; the label and properties are specified inside the parentheses. Question 5. What does the Cypher MERGE clause guarantee? A) It always creates a new node. B) It deletes existing matching patterns. C) It matches existing pattern or creates it if none exists. D) It updates all properties to null. Answer: C Explanation: MERGE is idempotent – it matches an existing pattern or creates it when not found. Question 6. Which Cypher statement removes the property “age” from node n? A) REMOVE n.age B) DELETE n.age C) SET n.age = null D) UNSET n.age Answer: A

Program Practice Exam

Explanation: LIMIT restricts the result set to the specified number of rows. Question 10. What does the Cypher function size() return when applied to a collection? A) The sum of numeric elements B) The length of the collection C) The maximum element D) The data type of the collection Answer: B Explanation: size() returns the number of elements in a list or the length of a string. Question 11. Which of the following is a built‑in Cypher aggregation function? A) AVG() B) CONCAT() C) SPLIT() D) REPLACE() Answer: A Explanation: AVG calculates the average of numeric values across rows. Question 12. How can you call an APOC stored procedure to create a random UUID for a node property? A) CALL apoc.util.uuid() YIELD uuid SET n.id = uuid B) CALL apoc.create.uuid() YIELD uuid SET n.id = uuid C) CALL apoc.uuid.generate() YIELD uuid SET n.id = uuid D) CALL apoc.uuid() YIELD uuid SET n.id = uuid Answer: A

Program Practice Exam

Explanation: apoc.util.uuid() generates a UUID; the result is yielded and assigned. Question 13. Which Cypher keyword is used to introduce a subquery? A) SUBQUERY B) CALL { } C) WITH { } D) BEGIN SUBQUERY Answer: B Explanation: CALL { ... } defines an inline subquery in Neo4j 4.x and later. Question 14. When modeling a social network, which direction is recommended for “FOLLOWS” relationships? A) From follower to followee B) From followee to follower C) Bidirectional (both ways) D) No direction; use undirected relationships Answer: A Explanation: Storing “FOLLOWS” from the follower to the followee simplifies queries like “who does X follow?”. Question 15. What is a “Super Node” in Neo4j terminology? A) A node with a unique constraint B) A node that has an extremely high degree (many relationships) C) A node that stores index data D) A node that represents a graph schema Answer: B

Program Practice Exam

Answer: C Explanation: Bolt is the high‑performance binary protocol used by drivers to communicate with Neo4j. Question 19. In a Neo4j HA cluster, what is the role of the “leader” node? A) Stores all data copies. B) Handles all write transactions. C) Performs read‑only queries only. D) Acts as a load balancer for drivers. Answer: B Explanation: The leader (or primary) processes write transactions; followers replicate data. Question 20. Which Neo4j security feature controls which users can run which Cypher statements? A) LDAP integration B) Role‑Based Access Control (RBAC) C) IP whitelisting D) SSL/TLS encryption Answer: B Explanation: RBAC assigns privileges to roles, governing access to database operations. Question 21. In MongoDB, what format is used to store documents internally? A) JSON B) XML C) BSON D) CSV

Program Practice Exam

Answer: C Explanation: BSON (Binary JSON) is a binary-encoded serialization of JSON-like documents used by MongoDB. Question 22. Which of the following best describes the difference between a MongoDB collection and a relational table? A) Collections enforce a fixed schema, tables do not. B) Collections store documents with flexible fields; tables have rows with a fixed set of columns. C) Collections are always sharded; tables cannot be. D) Collections support joins natively; tables do not. Answer: B Explanation: MongoDB collections hold schemaless documents, whereas relational tables have a predefined column structure. Question 23. Which command creates a new database named “analytics” in the MongoDB shell? A) use analytics B) db.createDatabase('analytics') C) create db analytics D) db.new('analytics') Answer: A Explanation: use <dbname> switches to (and creates if absent) the specified database. Question 24. When should you embed a document rather than reference it in MongoDB? A) When the embedded data is large and changes frequently. B) When the relationship is one‑to‑many and you need atomic updates of the whole object.

Program Practice Exam

B) db.users.find({name: 1}) C) db.users.find({projection: "name"}) D) db.users.select("name") Answer: A Explanation: The second argument specifies a projection; {name:1, _id:0} returns only the name field. Question 28. Which update operator increments a numeric field by a specified amount? A) $set B) $inc C) $add D) $push Answer: B Explanation: $inc adds the given value to an existing numeric field. Question 29. What does the replaceOne() method do in MongoDB? A) Updates only the specified fields. B) Replaces the entire matched document with a new document. C) Merges the new document with the existing one. D) Deletes the matched document and inserts a new one. Answer: B Explanation: replaceOne() substitutes the whole document; fields not present in the replacement are removed. Question 30. Which command removes all documents that match a filter from the “orders” collection?

Program Practice Exam

A) db.orders.deleteOne(filter) B) db.orders.remove(filter) C) db.orders.deleteMany(filter) D) db.orders.drop(filter) Answer: C Explanation: deleteMany() deletes every document that satisfies the filter criteria. Question 31. Which type of index supports queries on array fields in MongoDB? A) Single‑field index B) Compound index C) Multikey index D) Text index Answer: C Explanation: Multikey indexes are automatically created for fields that hold arrays, enabling efficient array queries. Question 32. How does a compound index differ from a single‑field index? A) It indexes only embedded documents. B) It indexes multiple fields in a defined order. C) It can only be used for text search. D) It does not support range queries. Answer: B Explanation: A compound index includes several fields; query performance depends on the order of fields.

Program Practice Exam

Question 36. Which aggregation stage reshapes each document, adding, removing, or renaming fields? A) $group B) $unwind C) $project D) $lookup Answer: C Explanation: $project defines the output shape of each document. Question 37. How does the $group stage compute aggregates? A) By sorting documents first. B) By creating a new document for each distinct value of the _id expression. C) By merging all documents into a single array. D) By performing a full collection scan without indexes. Answer: B Explanation: $group groups documents by the _id expression and calculates accumulators (e.g., sum, avg) for each group. Question 38. Which pipeline stage performs a left‑outer join between two collections? A) $lookup B) $join C) $merge D) $unionWith Answer: A

Program Practice Exam

Explanation: $lookup allows embedding related documents from another collection, similar to a left‑outer join. Question 39. What is the purpose of the $unwind stage? A) To sort documents. B) To deconstruct an array field into multiple documents. C) To combine multiple collections. D) To limit the number of returned documents. Answer: B Explanation: $unwind creates a separate output document for each element of an array field. Question 40. Which of the following is a valid read concern in MongoDB? A) majority B) quorum C) primaryPreferred D) linearizable Answer: A Explanation: “majority” ensures the read reflects data acknowledged by a majority of replica set members. Question 41. What does a replica set provide in MongoDB? A) Horizontal sharding across multiple data centers. B) High availability through automatic failover. C) Automatic schema enforcement. D) Real‑time analytics. Answer: B

Program Practice Exam

D) rs.addShard("<host:port>") Answer: A Explanation: sh.addShard() is the mongo shell command to register a new shard. Question 45. What does field‑level encryption (FLE) protect in MongoDB? A) The entire database file on disk. B) Specific fields within documents, both at rest and in transit. C) Only the network traffic between client and server. D) The metadata of collections. Answer: B Explanation: FLE encrypts designated fields client‑side, ensuring they remain encrypted in storage and during transmission. Question 46. Which statement is true about multi‑document transactions in MongoDB? A) They are only available in sharded clusters. B) They require the storage engine to be WiredTiger. C) They cannot include write operations. D) They are automatically rolled back after 5 seconds. Answer: B Explanation: Multi‑document ACID transactions are supported when using the WiredTiger storage engine. Question 47. In Neo4j, which clause would you use to enforce that every Person node has a unique email property? A) CREATE CONSTRAINT ON (p:Person) ASSERT p.email IS UNIQUE B) CREATE INDEX ON :Person(email) UNIQUE

Program Practice Exam

C) CREATE UNIQUE CONSTRAINT ON (p:Person) ASSERT p.email D) ALTER NODE Person ADD UNIQUE(email) Answer: A Explanation: The syntax CREATE CONSTRAINT ON (n:Label) ASSERT n.property IS UNIQUE defines a uniqueness constraint. Question 48. Which Cypher function can be used to convert a string to uppercase? A) toUpper() B) upper() C) strtoupper() D) UPPERCASE() Answer: B Explanation: upper(string) returns the uppercase representation of the input. Question 49. How would you return the count of distinct cities visited by a user node (u) in a MATCH pattern? A) MATCH (u)-[:VISITED]->(c:City) RETURN count(c) B) MATCH (u)-[:VISITED]->(c:City) RETURN count(DISTINCT c) C) MATCH (u)-[:VISITED]->(c:City) RETURN distinct count(c) D) MATCH (u)-[:VISITED]->(c:City) RETURN sum(c) Answer: B Explanation: count(DISTINCT c) counts each city only once. Question 50. Which of the following statements about Neo4j’s native graph storage is correct? A) Data is stored as rows in a relational table.

Program Practice Exam

Question 53. How can you limit a Cypher query to skip the first 10 results and then return the next 5? A) SKIP 10 LIMIT 5 B) LIMIT 5 OFFSET 10 C) START 10 END 5 D) PAGE 2 SIZE 5 Answer: A Explanation: SKIP discards the initial rows, and LIMIT caps the number returned. Question 54. Which of the following best describes the purpose of the $lookup stage in MongoDB aggregation? A) To filter documents based on a condition. B) To reshape documents by adding computed fields. C) To perform a left‑outer join with another collection. D) To unwind array fields into separate documents. Answer: C Explanation: $lookup merges matching documents from a foreign collection, similar to a SQL left outer join. Question 55. What is the default write concern for a standalone MongoDB server? A) w: B) w: C) w:"majority" D) w: Answer: B

Program Practice Exam

Explanation: By default, MongoDB acknowledges writes after they are written to the primary’s memory (w:1). Question 56. Which of the following is a benefit of using the Neo4j Browser’s “Graph Visualisation” mode? A) It automatically creates indexes for all labels. B) It displays query results as interactive nodes and relationships. C) It converts Cypher to SQL. D) It runs queries in parallel on multiple servers. Answer: B Explanation: The Browser visualizes result sets as a graph, allowing interactive exploration. Question 57. In MongoDB, which operator adds an element to an array field only if it does not already exist? A) $push B) $addToSet C) $inc D) $append Answer: B Explanation: $addToSet ensures uniqueness within the array when adding a new element. Question 58. Which of the following statements about Neo4j’s CALL db.labels() procedure is true? A) It returns all relationship types. B) It lists all node labels present in the database. C) It creates a new label.