Database Reference
In-Depth Information
2.
Three nodes for the accounts.
3.
Three relationships linking the accounts to the customer.
Finding the accounts of the customer is as simple as performing the following:
1.
Finding the customer through an index lookup on the key that we specify
in advance
2.
Traversing out from this customer node using the owns relationship to the
accounts that we need
In the preceding example, we are performing only a single join operation over two
tables. This operation will become exponentially more expensive in a relational
database management system as the number of join operations increases and
logarithmically more expensive as the datasets involved in the join operation become
larger and larger. Calculating the Cartesian product of two sets (which is what
relational databases need to do in order to perform the join) becomes more and
more computationally complex as the tables grow larger.
We hope to have given you some initial pointers with regards to graph modeling
compared to relational modeling, and we will now proceed to discuss some pitfalls
and best practices.
Graph modeling - best practices and
pitfalls
In this chapter, we will give an overview of the generic recommendations and
best practices for graph database modeling, and we will also provide you with
some insight into common pitfalls for you to avoid. It goes without saying that
all of these recommendations are generic recommendations and that there may
beexceptionstotheserulesinyourspeciicdomains—justlikethiscouldbe
previously, in the case of your relational database design models.
Graph modeling best practices
In the upcoming sections, I will be sharing and discussing a number of practices
that have been successfully applied in a number of Neo4j projects.
 
Search WWH ::




Custom Search