Lets look at the two models in Figure 7.3.

Figure 7.3 Independent and Dependent entities

Customer and Account in the first example, and Customer in the second example are rectangles, yet Account in the second example is a rectangle with rounded corners, called a bub-tangle. The rectangles with straight right angle corners are independent and those with rounded corners are dependent.

An independent entity such as Customer in both examples and Account in the first example, is an entity where each occurrence (instance) can be found using only attributes that it owns, such as a Customer ID. A dependent entity such as Account in the second example, 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, Figure 7.4 contains the models from Figure 7.3 with example values for two attributes within Account, Account Number and the foreign key back to Customer, Customer ID. (Making up actual values is always a good way to explain and validate a data model.)

Figure 7.4 Independent and Dependent entities with sample values

On the model in Example 1, we see that Account Number is unique, and therefore to retrieve a specific Account requires only knowing the Account Number and not needing to know anything from Customer, making Account an independent entity. However in Example 2, Account Number 34 repeats three times, so the only way to know to return a specific account is to know who the customer is. So the combination of Customer ID and Account Number is required to distinguish a particular account, making Account in Example 2 a dependent entity.

Notice also that the relationship line looks different when connecting to an independent verses dependent entity. The dotted line means non-identifying and the solid line means identifying. Identifying relationships mean that the entity on the many side (the child) is always going to be a dependent entity to the entity on the one side (the parent).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset