wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

neo4j

Total questions: 80

Worksheet time: 44mins

Name
Class
Date
1.

To restore a Neo4j instance from a backup, which of the following is accurate?

a)

The Neo4j backups are fully functional databases. To use a backup, all you need to do replace your database folder with the backup. Just make sure the database isn't running while replacing the folder.

b)

The Neo4j "backup-restore" command will copy the compressed backup archive files and logical logs to the existing instance database folder, replay the transactions, and bring the database back online.

c)

Issuing a "restore" command with a timestamp will recover the Neo4j instance up to that particular point in time, before any transactions corrupted the database files

d)

Shut down the current instance, replace the database folder with the backup, and then startup the Neo4j instance in recovery mode so the database is fully recovered.

2.

Which statements regarding page cache are true:

a)

The page cache uses off-heap memory.

b)

The Java heap contains the page cache

c)

If possible you should assign enough RAM to "dbms.pagecache.memory" to hold the full graph.

d)

The page cache is implemented in C++ for maximum throughput.

e)

The page cache has a minimal of overhead compared to the binary storage on disc.

3.

The following Cypher statement may not return the list of all employees who work for Acme.

MATCH (a:Employee {id:5})-[:WORKS_FOR]->(b:Company {name:"Acme"}) RETURN a LIMIT 10

Select the statement(s) below that describe why the statement may not return the list of all employees who work for Acme.

a)

We are returning only the variable a; to get the list of employee names we would have to return a.name.

b)

The LIMIT 10 following the RETURN clause means we will only get 10 results and there may be more than 10 employees who work at Acme in the graph.

c)

We are matching on a node with an Employee label and with an id property of value 5, which may refer only to a single employee.

d)

The LIST keyword needs to be used in the RETURN statement to generate the list of all nodes.

4.

Which statement best defines uniqueness constraints in Neo4j?

a)

Neo4j does not support uniqueness constraints.

b)

A rule in the database that ensures a property value is unique among all nodes.

c)

A rule in the database that ensures a property value is unique for all nodes with a specific label.

d)

A rule in the database that ensures a node or relationship is unique.

5.

What's the default port for the Bolt server?

a)

7687

b)

7474

c)

7473

d)

5000

6.

What information can we not find out by executing the dbms.listQueries() procedure?

a)

Bytes allocated for the executing query

b)

Planner used by the query

c)

Username of the user who is executing the query.

d)

IP address of the machine that is executing the query

7.

When using a language driver, a statement results comprises a stream of...

a)

nodes

b)

rows

c)

entries

d)

records

8.

Is ORDER BY a valid Cypher clause?

a)

true

b)

false

9.

Which of the following best describes what the below Cypher statement will do?

MATCH (city:City {name: "San Mateo"})

MERGE (state:State {name: "California"})

MERGE (city)-[:LOCATED_IN]->(state)

RETURN city, state

a)

If there is a City node with name "San Mateo", uniquely create a :LOCATED_IN relationship to a State node with name "California," creating the State node if it does not already exist.

b)

The :LOCATED_IN relationship is only created if there is both a City node with name "San Mateo" and a State node with name "California."

c)

The :LOCATED_IN relationship is overwritten only if there is both a City node with name "San Mateo" and a State node with name "California."

d)

The :LOCATED_IN relationship is matched only if there is both a City node with name "San Mateo" and a State node with name "California."

10.

Which algorithm does Neo4j use to achieve consensus commits?

a)

Paxos

b)

Raft

c)

An in house algorithm

d)

SWIM

11.

Select the Cypher statements below that will find all of Jason's friends and set their verified property to true?

a)

MATCH (a:Person {name:"Jason"})-[:FRIEND]-(b:Person)

WITH COLLECT(b) AS friends

FOREACH (n IN friends | SET n.verified = TRUE)

b)

MATCH (a:Person)-[:FRIEND]->(b) UPDATE b

SET b.verified = TRUE

c)

MATCH (a:Person)-[:FRIEND]->(b) WHERE a.name = "Jason" UPDATE b SET b.verified = TRUE

d)

MATCH (a:Person {name:"Jason"})-[:FRIEND]-(b:Person) SET b.verified = TRUE

12.

Of the following, which would be recommended approaches for tuning and potentially improving performance of Neo4j?

a)

Optimizing the cache settings so more of the graph fits into memory.

b)

Increasing the size of the performance global area to increase the number of hits in the cache.

c)

Distributing reads across a cluster of Neo4j instances for higher concurrent access. 

d)

Increasing the parallel_servers configuration setting so queries can be broken down and worked on by multiple threads.

13.

Referential integrity is maintained in Neo4j because you cannot delete a node that has existing relationships attached.

a)

true

b)

false

14.

A single node can have a relationship that points at itself?

a)

true

b)

false

15.

Which of the following statements best describes Cypher's MERGE clause?

a)

MERGE is used to merge multiple nodes or relationships in the graph together to form a single node or relationship.

b)

MERGE is used to return multiple nodes in a Cypher return statement

c)

The MERGE clause ensures that a pattern exists in the graph. Either the pattern already exists, or it needs to be created.

d)

MERGE can be used to join two graph databases together by de-duplicating nodes and relationships

e)

MERGE is not a valid Cypher clause.

16.

What, specifically, does the following expression do?: size( (n)-[:TYPE]->() ) ?

a)

It counts the number of relationships with this type and direction?

b)

This is not valid Cypher

c)

It reads the degree-value for this relationship-type and direction directly from the node record.

d)

It executes a MATCH first and then returns the size of the path - collection.

17.

Property values can be the following:

a)

- Numbers

- Strings

b)

- boolean values

- byte[]

c)

Nested Documants

d)

List<String>

e)

Arrays of string

18.

How do you perform an aggregation in Cypher?

a)

Using the GROUP BY keyword

b)

Using at least one aggregation function.

c)

Defining grouping keys with WITH

d)

With the AGGREGATE keyword

19.

Which procedure can be run to get a list of all procedures in the DBMS?

a)

db.procedures()

b)

dbms.showProcedures()

c)

db.listProcedures()

d)

dbms.procedures()

20.

In a Neo4j database, which of the below best describes what Nodes are used for?

a)

Used to represent entities and complex value types in the graph.

b)

As a table structure that identifies like entities and groups them together.

c)

As a reference holder for keys, which also store values, and foreign key links to other nodes.

d)

As endpoints on either side of a relationship, used to bring together relationships in the graph.

21.

When using a language driver, TLS encryption is enabled for all connections by default

a)

true

b)

false

22.

What's the correct exception to throw to signal an error from within a procedure?

a)

RuntimeException

b)

ProcedureException

c)

NotFoundException

d)

TransientTransactionFailureException

23.

Which of the following would be the correct Cypher syntax to create an index on the id property for nodes with the Customer label?

a)

CREATE INDEX ON :Customer(id);

b)

CREATE INDEX ON :Customer.id;

c)

CREATE INDEX ON Customer(id);

d)

CREATE GRAPH INDEX ON :Customer.id;

24.

The Cypher PROFILE keyword can be used for what purpose?

a)

Entered before the statement it is used to return the query plan and execution information for a Cypher statement for performance tuning purposes

b)

Used when creating parameterized Cypher queries, it tells the query engine to build a query plan for later use

c)

The PROFILE clause will detail the current statistics for the server, including node counts, relationship counts, and data size

d)

PROFILE will identify the schema for the current database, including labels in use, relationship types, and indexes

25.

In modeling, the use of Bi-directional relationships is a good practice when which of the following is true?

a)

The semantics of the relationship in one direction is different from the other direction

b)

When you want to show the same relationship between two nodes in each direction

c)

When a relationship between two nodes could be represented in either direction

d)

This is never a good idea

26.

Labels are best described as:

a)

Unique tags on each node for fast lookups

b)

Special types of node or relationship properties

c)

Tags that are used to group nodes into sets

d)

Table names in the graph database

27.

Which of the following statements best describes properties?

a)

Properties are the key-value pairs on both nodes and relationships

b)

Properties are the key-value pairs on nodes only

c)

Properties are the key-value pairs on relationships only

d)

None of the above

28.

Which of the following best describes Cypher, Neo4j's graph query language?

a)

It's a SQL plugin for Neo4j

b)

It is a regular expression-like programming language for interfacing with Neo4j.

c)

It is a declarative query language designed for graph pattern matching and traversals

d)

It is a procedural programming language for interfacing with Neo4j

29.

When using a language driver, transactions can be executed in which access modes?

a)

ReadWriteOnce, ReadOnlyMany, or ReadWriteMany

b)

Master or Slave

c)

Read or Write

d)

Serializable, Read committed, or Read uncommitted

30.

Two nodes can only be connected by a single relationship?

a)

false

b)

true

31.

Of the following, which are reasons why Labels are used?

a)

Used to represent entities, such as users, products, or company

b)

Used to group like nodes together

c)

Used to represent tables in the database

d)

Used to associate indexes and constraints with groups of nodes

32.

Which log files should I inspect if Neo4j doesn't start up - on a production installation (not Neo4j Desktop).

a)

logs/main.log

b)

/var/log/neo4j.log

c)

logs/neo4j.log

d)

logs/debug.log

e)

/dev/null

33.

Which of the following best describes the OPTIONAL MATCH clause in Cypher?

a)

OPTIONAL MATCH is not a Cypher clause

b)

The OPTIONAL MATCH searches for a described pattern that may or may not exist, assigning NULL to any identifiers in the pattern that do not exist

c)

The OPTIONAL MATCH clause will take a set of property values and optionally match them against all nodes in the database

d)

OPTIONAL MATCH provides parameter placeholders for Cypher queries. It holds a parameterized query and then optionally matches it against the graph with the values supplied by the client

34.

Neo4j can be deployed...

a)

...as a standalone server.

b)

...embedded in a Java application

c)

...embedded in a Java application or as a standalone server

d)

...with an app server only

e)

None of the above

35.

All nodes with the same label must have the same property keys.

a)

true

b)

false

36.

When modeling with Neo4j, which of the following best represents inferring a symmetric relationship for the below simple graph:

(parent:Parent)-[:PARENT_OF]->(child:Child)

a)

child is a CHILD_OF parent

b)

parent is the CHILD_OF parent

c)

child is the PARENT_OF parent

d)

child HAS_SIBLINGS from parent

37.

How does the Neo4j configuration property "keep_logical_logs" affect Neo4j backup?

a)

This property defines how long to keep the log files with transaction history.  When running a backup, if the time since you've last run a backup is longer than the time specified in this configuration setting, Neo4j will be unable to incrementally apply all historical transactions and instead will do a full backup

b)

This configuration property identifies the number of logs to keep to recover a backup into a fully functioning instance

c)

This configuration will define whether logical or physical logs will be stored by Neo4j, which will determine whether a backup can copy data from memory or from the disk

d)

This configuration identifies how many logs Neo4j should keep in memory for quick, incremental backups every hour

38.

What prefix should be used in the connection URI when connecting an application to a Neo4j causal cluster?

a)

bolt

b)

bolt+cluster

c)

bolt+routing

d)

bolt+casualcluster

39.

In the following MATCH clause, which of the elements represents the relationship between two nodes?

MATCH (a)-[b]->(c)

a)

(a)

b)

(a)-

c)

-[b]->

d)

->(c)

40.

what is the main responsibility of read replicas in a causal cluster?

a)

Scaling writes

b)

Taking part in the Raft election algorithm

c)

Scaling out graph workloads

d)

Replicating data around the cluster

41.

You can create the same type of relationship between two nodes with each relationship having different properties?

a)

true

b)

false

42.

Which of the following actions is a user with the native role 'architect' able to do?

a)

Change own password

b)

Assign/remove role to/from user

c)

Create/drop index/constraint

d)

View all queries

e)

View all roles for a user

43.

Which of the following best describes the Causal Clustering causal_clustering.refuse_to_be_leader configuration setting in the neo4j.conf file?

a)

Defines whether this instance should not put itself forward for election

b)

Identifies whether the instance can be written to or not

c)

Determines whether all instances in the cluster will be writable or not

d)

Configures a standalone Neo4j instance to be read only

44.

Which export formats does the Neo4j Browser support?

a)

PNG

CSV

b)

XML

XLS

c)

GRAPHML

d)

SVG

45.

Neo4j is an ACID-compliant database.

a)

TRUE

b)

FALSE

46.

Which of the following best describes a Relationship in Neo4j?

a)

A structure with a name and direction that describes the relationship between two nodes and provides structure and context to the graph.

b)

The link between two types of nodes.

c)

A link that indicates how one type of node is, or should be connected to another type of node.

d)

A key/value pair that identifies additional nodes that a single node is related to, including direction and weight

47.

Neo4j is available with both open-source and commercial licenses.

a)

true

b)

false

48.

Which of the following best describes the Neo4j data model?

a)

Nodes and properties.

b)

Nodes, relationships, and properties.

c)

Nodes, foreign keys, and relationships.

d)

Rows, properties, and relationships.

e)

Nodes and relationships.

49.

Read replicas have transactions pushed down to them by core servers 

a)

true

b)

false

50.

On a Neo4j instance participating in a cluster, which of the following configuration settings is used to define the list of other known instances that cluster?

a)

causal_clustering.initial_discovery_members

b)

causal_clustering.host_list

c)

causal_clustering.cluster_members

d)

causal_clustering.cluster_instances

51.

Which function allows you to create a list of values as result of an aggregation?

a)

The collect() function.

b)

The toList() function.

c)

The aggregate() function.

d)

The values() function.

52.

Foreign keys are necessary in a graph database. These allow you to determine which nodes are related. 

a)

false

b)

true

53.

Which of the following Cypher statements will return the number of cities in the state of California?

a)

MATCH (:State {name:"California"})<-[:LOCATED_IN]-(city:City) RETURN count(city)

b)

MATCH (state:State)<-[:LOCATED_IN]-(city:City) WHERE state.name="California" RETURN count(city)

c)

MATCH (state:State {name:"California"}) JOIN state, MATCH (city:City) RETURN count(city)

d)

MATCH (city:City) FILTER relationships(LOCATED_IN) FILTER related(:STATE {name:"California"}) RETURN count(city)

54.

Which of the following best describes the LIMIT clause in Cypher?

a)

RETURN db.labels()

b)

CALL db.labels()

c)

RETURN CALL db.labels()

d)

CALL db.labels() YIELD label RETURN label

55.

Neo4j allows for undirected relationships between nodes.

a)

true

b)

false

56.

Cypher has a collection of statistics functions that allow you to identify data points such as the maximum and minimum values, standard deviation, and percentiles.

a)

true

b)

false

57.

What parts of a Cypher query can be parameterized?

a)

Labels

b)

Property values

Map values

c)

Relationship types

d)

Index query expressions for explicit indexes

e)

Literals

58.

Which of the following Cypher statements would return the total population in all cities located in California?

a)

MATCH (:STATE {name:"California"})<-[:LOCATED_IN]-(city:CITY) RETURN sum(city.population)

b)

MATCH (city:CITY) sum(city.population) as total WHERE (city)-[:LOCATED_IN]->(:STATE {name="California"}) RETURN total

c)

SUM (:CITY.population) WHERE city.relationships(:SATE.name="California") RETURN

d)

MATCH (state:STATE {name:"California"}) MATCH (city:CITY) JOIN state,city RETURN SUM(city.population)

59.

Neo4j version 2.2 introduced basic authentication with the server, which when enabled requires a username and password to be supplied to query the server.

a)

true

b)

false

60.

Which of the following are not native security roles in Neo4j?

a)

admin

b)

publisher

c)

developer

d)

architect

61.

How do you define ";" as field terminator in LOAD CSV?

a)

LOAD CSV FROM "url" AS row FIELDTERMINATOR ";" 

b)

LOAD CSV FROM "url" AS row TERMINATED BY ";" 

c)

LOAD CSV DELIMETER ";" FROM "url" AS row 

d)

LOAD CSV FROM "url" AS row WITH split(row, ";") as fields

62.

Relationships are defined with regard to node instances, not classes of nodes.

a)

true

b)

false

63.

What type of database is Neo4j?

a)

Key-value store.

b)

Document database.

c)

Graph database.

d)

Relational database.

e)

Semantic database.

64.

Which of the following best describes the CONNECT_BY clause in Cypher

a)

The CONNECT_BY clause is used to join nodes when they are connected by varying relationship depths.

b)

The CONNECT_BY clause is used when constructing a graph tree structure where you want to define the nodes that a leaf node is connected to.

c)

The CONNECT_BY clause is used in Cypher to limit the pattern to only certain relationship types.

d)

The CONNECT_BY clause is a constraint that ensures only certain relationships can connect two nodes with specific labels together.

e)

CONNECT_BY is not a valid Cypher clause.

65.

Which of the following best describes the LIMIT clause in Cypher?

a)

LIMIT is used to limit the number rows returned from the query or passed to other parts of a query. 

b)

LIMIT is used within the WHERE clause to limit the number of relationships traversed during a query. 

c)

The LIMIT clause is used when creating nodes to limit the number of relationships between two nodes. 

d)

The LIMIT clause is used with a RETURN clause to limit the types of values returned from node properties.

66.

An Unmanaged Extension is best described by which of the following?

a)

Unmanaged Extensions provide finer grained control over your application's interactions with Neo4j than Cypher by allowing you to write server-side code using Neo4j's Java API's and access the extension through REST calls.

b)

Unmanaged Extensions are references to the HTTP REST API's that currently do not require authentication for reading or writing data to the graph.

c)

Unmanaged Extensions are custom application services that bypass Neo4j's Cypher interface and directly interact with data stored on disk.

d)

Unmanaged Extensions are custom Cypher extensions that provide end-user specific functional capabilities to Cypher.

67.

Which of the following Cypher statements will return actors and the directors who directed their movies?

a)

MATCH (actor)-[:ACTED_IN]->(movie)<-[:DIRECTED]-(director) RETURN actor, director

b)

MATCH (actor)-[:ACTED_IN]->(movie) JOIN (movie)<-[:DIRECTED]-(director) RETURN actor, director

c)

MATCH (actor)-[:ACTED_IN]-(movie) CONNECT (movie)-[d:DIRECTED]-(director) RETURN actor, director

d)

MATCH (actor)-[a:ACTED_IN]->(movie)<-[b:DIRECTED]-(director)  RETURN a, b

68.

Which of the following best describes the options available for loading data into Neo4j?

a)

Neo4j's neo4j-import tool, Cypher LOAD CSV clause, or batch operations against the REST endpoint.

b)

Commercial ETL tools that can transform and load data in graph format.

c)

Direct database connections from other database tools to load data in directly

d)

The Cypher BULK LOAD clause to import data from an existing text file

69.

The four building blocks of a Neo4j Graph Database are:

Nodes

Relationships

Properties

Labels

a)

true

b)

false

70.

In Neo4j modeling, a timeline tree is a recommended approach for representing time and connecting discrete events with no natural relationship to other events where you need to find events by granularity of time.

a)

true

b)

false

71.

Neo4j requires which of the following?

a)

Java runtime environment

b)

Microsoft .NET environment

c)

A J2EE container server

d)

A SAN storage system

e)

None of the above

72.

Which keyword in the RETURN clause will return only one instance of each item in a result set?

a)

UNIQUE

b)

DISTINCT

c)

SINGLE

d)

FIRST

73.

Which of the following schema objects does Neo4j include?

a)

Tables

b)

Columns

c)

Materialized views

d)

none of above

74.

Two nodes representing the same kind of thing, such as a person, can be connected to other nodes using different relationship types.

a)

true

b)

false

75.

Given this Cypher statement, select the answer that best describes what data is returned from the query?

MATCH (person:Person) WHERE person.id = 526321 RETURN KEYS(person)

a)

A collection of the property keys stored on the node with the Person label and an id property with a value of 526321

b)

The internal key reference pointer for the node with the Person label and an id property with a value of 526321

c)

The index keys stored for the node with the Person label and an id property with a value of 526321

d)

The key pointers for relationships connected to the node with the Person label and an id property with a value of 526321

76.

What are the benefits of parameterized Cypher?

a)

The query plan from previous invocations is reused, therefore it's much more performant

b)

Provides protection against code injection

c)

Automatic query parallelization in a cluster

d)

There are no benefits. Constructing statements with literal values is as good

e)

Parameters are only available in SQL, Cypher doesn't support it

77.

Neo4j uses the Property graph model.  Which of the following best describes a property graph?

a)

Nodes and relationships define the graph while properties add context by storing relevant information in the nodes and relationships

b)

Property graph defines a graph meta-structure that acts as a model or schema for the data as it is entered

c)

The Property graph is a model similar to RDF which describes how Neo4j stores resources in the database

d)

The Property graph allows for configuration properties to define schema and structure of the graph

78.

Select the Cypher statements below that will delete a node with an id of 3563 and all of its possibly connected relationships?

a)

MATCH (a:Thing {id:3563}) OPTIONAL MATCH (a)-[r]-() DELETE a, r

b)

MATCH (a:Thing {id:3563}) DELETE a

c)

MATCH (a:Thing {id:3563}) DETACH DELETE a

d)

MATCH (a:Thing {id:3563})-[r]-(b) DELETE a, r

79.

In modeling, the concept of an intermediate node is used in what situation?

a)

To connect more than two nodes in a single context, such as where a person worked and in what role during what timeframe

b)

As a sub-node to represent complex entities as multiple nodes

c)

In support of linked lists to identify next relationships

d)

Before or after Primary nodes for quick traversals through the graph

80.

Which of the following best describes a Neo4j incremental backup?

a)

A snapshot of the transaction log from the last backup point is copied to the backup location so it can be replayed during a restore.

b)

An incremental backup is performed whenever an existing backup directory is specified. The backup tool will then copy any new transactions from the Neo4j server and apply them to the backup. The result will be an updated backup that is consistent with the current server state.

c)

An incremental backup is a scheduled backup process in Neo4j that copies transactions from the database to a backup location for future recovery purposes

d)

Neo4j does not have an incremental backup capability