Database Reference
In-Depth Information
Figure 2.8. The user with some nodes converted to properties
Address isdifferentfrom Name , Age ,and FavoriteColor ,becauseyoumightbein-
terested in using shared addresses to connect users to each other. A user who has moved
housemighthaveacurrentandapreviousaddress,oralistofhistoricaladdresses.Accord-
ingly, it may make sense to model addresses as entities, represented by nodes of their own.
Nowsupposeyouwanttodistinguishbetweenauser'scurrentandpreviousaddresses.One
waytodothiswouldbetoattachan is_current flagtotheaddressnodeasanproperty.
But if two users had lived at the same address, and one was the current and the other a pre-
vious occupant, then whatever value this flag had would be false for one of them. Being a
user's current address is not a property of the address itself, or of the user, but of the rela-
tionship between them—a relationship that may change over time, as users move from one
address to another.
Thereareatleastthreewaystorepresentthefactthatanaddressisauser'scurrentaddress.
The first is to label the relationship itself differently, as in figure 2.9 .
 
Search WWH ::




Custom Search