Database Reference
In-Depth Information
Figure 3.12. Complete model of a movie-lovers' social network
Figure 3.12 isthesameas figure 3.6 .You'vemanagedtocreatethesamegraphintheNeo4j
graph database using the Neo4j Core Java API.
3.3. Node labels
In the previous section we mentioned that nodes in the Neo4j database don't have
types—they're just “boxes.” In order to differentiate between movie nodes and user nodes,
we added property types to each node, with corresponding values.
In version 2.0, Neo4j introduced the (built-in) concept of node labels, which can help you
group similar nodes. Node labels are very similar to the relationship type names we dis-
cussed earlier.
Each node can optionally have one or more text descriptions, which we call node labels.
Nodes with the same labels are stored in a specific manner so that they can be grouped and
used together. Neo4j supports the following label-related operations out of the box in the
CoreJavaAPI:loading all nodesbylabel andfindingnodesbylabel andproperty.Schema
indexes are also defined using labels.
 
 
Search WWH ::




Custom Search