wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Concepts in Neo4j Database

Total questions: 5

Worksheet time: 3mins

Name
Class
Date
1.

1. Question: In Neo4j, which of the following best describes the property graph model?

a)
  • A. Nodes and relationships without properties, relying on external metadata

b)
  • B. A schema-less model where both nodes and relationships can have properties

c)
  • C. A schema-driven model where properties must be predefined

d)
  • D. A document-oriented model similar to MongoDB

2.

2. Question: Which of the following Cypher queries correctly retrieves nodes labeled 'Person' with the name 'Alice' and all their direct relationships?

a)
  • A. MATCH (p:Person)-[r]->() WHERE p.name = 'Alice' RETURN p, r

b)
  • B. SELECT * FROM Person WHERE name = 'Alice'

c)
  • C. FIND (p:Person)-[r]->() WHERE p.name = 'Alice' SHOW p, r

d)
  • D. MATCH (p)-[r:Person]->(n) WHERE p.name = 'Alice' RETURN r, n

3.

3. Question: Which of the following operations in Neo4j benefits most from using indexes?

a)
  • A. Full graph traversal to find shortest paths

b)
  • B. Pattern matching across multiple node types

c)
  • C. Finding nodes by a specific property value

d)
  • D. Aggregating relationship counts between node pairs

4.

4. Question: How does Neo4j handle ACID (Atomicity, Consistency, Isolation, Durability) properties in transactions?

a)
  • A. Neo4j only ensures Consistency and Durability, leaving Atomicity and Isolation to the application layer

b)
  • B. Neo4j fully supports ACID properties in all transactions

c)
  • C. Neo4j provides eventual consistency with relaxed ACID compliance

d)
  • D. Neo4j does not support ACID properties, relying on BASE (Basically Available, Soft state, Eventually consistent)

5.

15. Question: In Neo4j, which of the following is a correct way to create a relationship between two existing nodes with specific properties?

a)
  • A. MATCH (a), (b) CREATE (a)-[:REL {prop: value}]->(b)

b)
  • B. MATCH (a), (b) ADD (a)-[:REL {prop: value}]->(b)

c)
  • C. FIND (a), (b) CONNECT (a)-[:REL {prop: value}]->(b)

d)
  • D. SELECT (a), (b) LINK (a)-[:REL {prop: value}]->(b)