Database Reference
In-Depth Information
Note
In Neo4j, the property value must be set for every property added. In other words, proper-
ties with a null value are not permitted in Neo4j.
The property values in the preceding example are strings. But Neo4j supports a number of
different types that can be set as node properties. Table 3.1 shows the property types that
can be used, with their corresponding Java types.
Table 3.1. The property types in Neo4j
Description
Java type
Sequence of Unicode values
java.lang.String
Single Unicode value
char
True/false
boolean
8-bit integer
byte
16-bit integer
short
32-bit integer
int
64-bit integer
long
32-bit floating-point number
double
64-bit floating-point number
float
Arrays of any of above types
[]
Nodes with properties are schemaless, semi-structured elements. Each node can have any
number of properties; the next listing illustrates how you can add different properties to
different nodes.
Note
Properties can be added to relationships as well; that will be covered later in this chapter.
 
Search WWH ::




Custom Search