Database Reference
In-Depth Information
A graph model - a simple, high-idelity
model of reality
Let's take a quick look at how we can avoid the complexity mentioned previously
inthegraphworld.Inthefollowingigure,youwillindthegraphmodelandthe
relational model side by side:
The relational model versus the graph model
On the right-hand side of the image, you will see the three tables in the
relational model:
• A customers table with a number of customer records
• An Accounts table with a number of accounts of these customers
• A typical join table that links customers to accounts
What is important here is the implication of this construction: every single time
wewanttoindtheaccountsofacustomer,weneedtoperformthefollowing:
1.
Look up the customer by their key in the customer table.
2.
Join the customer using this key to their accounts.
3.
Look up the customer's accounts in the accounts table using the account
keys that we found in the previous step.
Contrastthiswiththeleft-handsideoftheigure,andyouwillseethatthemodel
ismuchsimpler.Weindthefollowingelements:
1.
A node for the customer.
 
Search WWH ::




Custom Search