Database Reference
In-Depth Information
bed or reference, has more to do with usage than technology. No matter how
skilled we are with MongoDB, we still need to know the business require-
ments!
2
The child is a dependent entity
. In the following model,
Customer
and
Account
in Example 1, and
Customer
in the Example 2 are independent entities (shown
as rectangles), and
Account
in Example 2 is a dependent entity (shown as a
rectangle with rounded corners).
An independent entity is an entity where each occurrence (instance) can be found using
only its own attributes such as a
Customer ID
for
Customer
. A dependent entity, such as
Account
in the second example, contains instances that can only be found by using at least
one attribute from a
different
entity such as
Customer ID
from
Customer
.
To make the explanation of independent and dependent clearer, here are our two data mod-
els with example values for two attributes within
Account
,
Account Number
and the for-
eign key back to
Customer
,
Customer ID
.