Search Header Logo

Concepts in Neo4j Database

Authored by ahmed shama

Information Technology (IT)

University

Used 4+ times

Concepts in Neo4j Database
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

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

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

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

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

  • D. A document-oriented model similar to MongoDB

Answer explanation

B. (Correct Answer)

Explanation: Neo4j uses a property graph model where both nodes and relationships can have properties, allowing for flexible schema-less data modeling.

2.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

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

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

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

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

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

Answer explanation

  • A. (Correct Answer)

  • Explanation: The correct Cypher query syntax is MATCH (p:Person)-[r]->() WHERE p.name = 'Alice' RETURN p, r, which retrieves the node 'Alice' and all its outgoing relationships.

3.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

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

  • A. Full graph traversal to find shortest paths

  • B. Pattern matching across multiple node types

  • C. Finding nodes by a specific property value

  • D. Aggregating relationship counts between node pairs

Answer explanation

  • C. (Correct Answer)

  • Explanation: Indexes in Neo4j significantly improve the performance of finding nodes by a specific property value, reducing lookup times from O(N) to O(log N) or even O(1).

4.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

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

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

  • B. Neo4j fully supports ACID properties in all transactions

  • C. Neo4j provides eventual consistency with relaxed ACID compliance

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

Answer explanation

  • B. (Correct Answer)

  • Explanation: Neo4j fully supports ACID properties, ensuring that all database transactions are reliable, consistent, and safe.

5.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

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

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

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

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

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

Answer explanation

  • A. (Correct Answer)

  • Explanation: The correct Cypher syntax for creating a relationship with specific properties between two nodes is MATCH (a), (b) CREATE (a)-[:REL {prop: value}]->(b).

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?