Database Reference
In-Depth Information
Figure 2.11. Reifying the relationship between a
User
and an
Address
in order to introduce other participants
Inthiscase,theflagindicatingwhethertheoccupancyiscurrenthasbeenaddedtothe
Oc-
cupancy
nodeitself.Butitcouldalsobemadeapropertyofthe
has_held
relationship,
or two different relationship labels could be used for current or previous occupancies.
Another consideration when deciding whether to model the properties of entities using
nodes is the efficiency with which the query engine can traverse the graph. It's usually not
a good idea, for example, to extend a node's data by placing it in a relationship to another
node whose only purpose is to hold additional properties, as in
figure 2.12
.