السلام عليكم ورحمة الله و بركاته
قرأت هذه المقاله ولم افهم الفكره لها فارجو توضيحها
Relationships as Attributes.
It is sometimes convenient to think of a relationship
type in terms of attributes, as we discussed in Section 3.3.3. Consider the WORKS_FOR
relationship type of Figure 3.9. One can think of an attribute called Department of the
EMPLOYEE entity type whose value for each employee entity is (a reference to) the department
entity that the employee works for. Hence, the value set for this Department attribute is the
set of all DEPARTMENT entities, which is the DEPARTMENT entity set. This is what we did in Figure
3.8 when we specified the initial design of the entity type EMPLOYEE for the COMPANY
database. However, when we think of a binary relationship as an attribute, we always have
two options. In this example, the alternative is to think of a multivalued attribute
Employees of the entity type DEPARTMENT whose values for each department entity is the set
of employee entities who work for that department. The value set of this Employees attribute
is the power set of the EMPLOYEE entity set. Either of these two attributes—Department of
EMPLOYEE or Employees of DEPARTMENT—can represent the WORKS_FOR relationship type. If
both are represented, they are constrained to be inverses of each other.9
اتمنى منكم مساعدتي
تحياتي