9) Define the concept of aggregation. Give one examples of where this concept is useful.
Answer: Aggregation is an abstraction through which relationships are treated
as higher-level entities. Thus the relationship between entities A and B is treated
as if it were an entity C. Some examples of this are:
Answer: Aggregation is an abstraction through which relationships are treated
as higher-level entities. Thus the relationship between entities A and B is treated
as if it were an entity C. Some examples of this are:
- Employees work for projects. An employee working for a particular project
uses various machinery.
10) An E-R diagram can be viewed as a graph. What do the following mean in terms of the structure of an enterprise schema?
a. The graph is disconnected.
b. The graph is acyclic.
Answer :
a) If a pair of entity sets are connected by a path in an E-R diagram, the entity sets are related, though perhaps indirectly. A disconnected graph implies that there are pairs of entity sets that are unrelated to each other. If we split the graph into connected components, we have, in effect, a separate database corresponding to each connected component.
b) As indicated in the answer to the previous part, a path in the graph between a pair of entity sets indicates a (possibly indirect) relationship between the two entity sets. If there is a cycle in the graph then every pair of entity sets
on the cycle are related to each other in at least two distinct ways. If the E - R
diagram is acyclic then there is a unique path between every pair of entity
sets and, thus, a unique relationship between every pair of entity sets.
11) A weak entity set can always be made into a strong entity set by adding to its attributes the primary key attributes of its identifying entity set. Outline what sort of redundancy will result if we do so.
Answer: The primary key of a weak entity set can be inferred from its relation-
ship with the strong entity set. If we add primary key attributes to the weak
entity set, they will be present in both the entity set and the relationship set and
they have to be the same. Hence there will be redundancy.
12) Explain the distinction between condition-defined and user-defined constraints. Which of these constraints can the system check automatically? Explain your answer.
Answer: In a generalization– specialization hierarchy, it must be possible to decide which entities are members of which lower level entity sets. In a condition defined design constraint, membership in the lower level entity-sets is evaluated on the basis of whether or not an entity satisfies an explicit condition or predicate.User-defined lower-level entity sets are not constrained by a member-
ship condition; rather, entities are assigned to a given entity set by the database
user.
Condition-defined constraints alone can be automatically handled by the system. Whenever any tuple is inserted into the database, its membership in the
various lower level entity-sets can be automatically decided by evaluating the
respective membership predicates. Similarly when a tuple is updated, its membership in the various entity sets can be re-evaluated automatically.
13) Explain the distinction between total and partial constraints.
Answer: In a total design constraint, each higher-level entity must belong to a
lower-level entity set. The same need not be true in a partial design constraint.
For instance, some employees may belong to no work-team.
Comments
Post a Comment