CH4 The Enhanced Entity–Relationship (EER) Model Flashcards
4.1. What is a subclass? When is a subclass needed in data modeling?
- The set or collection of entities in each of the groupings is a subset of the entities that belong to the superclass entity set, meaning that every entity that is a member of one of these subgroupings is also a member of the superclass
- subgroupings or subtypes of its entities that are meaningful and need to be represented explicitly because of their significance to the database application
- a member entity of the subclass represents the same real-world entity as some member of the superclass
- a subclass inherits all the attributes of the entity as a member of the superclass. The entity also inherits all the relationships in which the superclass participates. N
Define the following terms: superclass of a subclass,
- We call each of these subgroupings a subclass or subtype of the EMPLOYEE entity type, and the EMPLOYEE entity type is called the superclass or supertype for each of these subclasses
Define the following terms: superclass/subclass rela- tionship
the relationship between a superclass and any one of its subclasses
Define specialization
- Specialization is the process of defining a set of subclasses of an entity type
- e set of subclasses that forms a specialization is defined on the basis of some distinguishing characteristic
- A specialization Z = {S1, S2, … , Sn} is a set of subclasses that have the same super- class G;
Define generalizatio
- We use the term generalization to refer to the pro- cess of defining a generalized entity type from the given entity types
- G is called a generalized entity type (or the superclass of the specialization, or a generalization of the subclasses {S1, S2, … , Sn} )
What is the difference between a specialization hierarchy and a specializa-
tion lattice?
A specialization hierarchy has the constraint that every subclass participates as a subclass in only one class/subclass relationship; that is, each subclass has only one parent, which results in a tree structure or strict hierarchy. In contrast, for a specialization lattice, a subclass can be a subclass in more than one class/subclass relationship.
How does a category differ from a regular shared subclass? What is a cate-
gory used for? Illustrate your answer with examples.
- a subclass will represent a collection of entities that is a subset of the UNION of entities from distinct entity types; we call such a subclass a union type or category
- A category has two or more superclasses that may represent collections of enti- ties from distinct entity types, whereas other superclass/subclass relationships always have a single superclass. To
- In a category the entity must exist in only one of the superclasses
- In a shared class the entity set is a subset of the intersection of the superclass entity sets.
- category OWNER entity inherits the attributes of a COMPANY, a PERSON, or a BANK, depending on the superclass to which the entity belongs. On the other hand, a shared subclass such as ENGINEERING_MANAGER inherits all the attributes of its superclasses SALARIED_EMPLOYEE, ENGINEER, and MANAGER.
Define class
A class11 defines a type of entity and represents a set or collection of entities of that type
What are the main similarities and differences between conceptual database modeling techniques and knowledge representation techniques?
Similarities
- identify common properties and important aspects of objects in the miniworld
- concepts, relationships, constraints, operations, and languages for defining data and representing knowledge
Differences
- Knowledge has reasoning mechanisms and can inference
Discuss the similarities and differences between an ontology and a database schema.
e main difference between an ontology and, say, a database schema, is that the schema is usually limited to describing a small subset of a mini- world from reality in order to store and manage data. An ontology is usually con- sidered to be more general in that it attempts to describe a part of reality or a domain of interest (for example, medical terms, electronic-commerce applications, sports, and so on) as completely as possib
Subclass EER diagram convention
- rectangle
- Fork pointing to the superclass. Connect superclass and subclass
specialization EER diagram convention
The subclasses that define a specialization are attached by lines to a circle
that represents the specialization,
predicate-defined subclass EER diagram convention
predicate-defined subclass by writing the predicate condition next to the line that connects the subclass to the specialization circle.
4.4. Discuss user-defined and predicate-defined subclasses, and identify the dif- ferences between the two.
- When we do not have a condition for determining membership in a subclass, the subclass is called user-defined. Membership in such a subclass is determined by the database users when they apply the operation to add an entity to the subclass; h
- exactly the entities that will become members of each subclass by placing a condition on the value of some attribute of the superclass. Such subclasses are called predicate-defined
specialization disjoint EER diagram convention
d in the circle stands for disjoint.
overlapping (nondisjoint) specialization EER diagram convention
o in the circle stands for disjoint.for an overlapping (nondisjoint) specialization.
4.5. Discuss user-defined and attribute-defined specializations, and identify the differences between the two.
- Keyword: all. If all subclasses in a specialization have their membership condition on the same attribute of the superclass, the specialization itself is called an attribute-defined specialization - A specialization that is attribute-defined implies the disjointness constraint - When we do not have a condition for determining membership in a subclass, the subclass is called user-defined. Membership in such a subclass is determined by the database users when they apply the operation to add an entity to the subclass; h
4.6. Discuss the two main types of constraints on specializations and generalizations.
- The two main constraints are total/partial and disjoint/overlapping.
- subclasses of the specialization must be disjoint sets. This means that an entity can be a member of at most one of the subclasses of the specialization
- sets may be overlapping; that is, the same (real-world) entity may be a member of more than one subclass of the specialization
- total specialization constraint specifies
that every entity in the superclass must be a member of at least one subclass
in the specializatio - partial specialization,
which allows an entity not to belong to any of the subclasses
total specialization EER diagram convention
a double line to connect the superclass to the circle
category EER diagram convention
The superclasses COMPANY, BANK, and PERSON are connected to the circle with the ∪ symbol, which stands for the set union operation
Category types
A category can be total or partial. A total category holds the union of all entities in its superclasses, whereas a partial category can hold a subset of the union. A
total category, partial EER diagram convention
A total category is represented diagrammatically by a double line connecting the category and the circle, whereas a partial category is indicated by a single line.
Define specific (local) attributes
- Attributes that apply only to entities of a particular subclass
- Keyword: only
Define specific relationships.
- relationship types that apply only to entities of a particular subclass
- Keyword: only
it is not necessary that every entity in a superclass is a member of some subclass.
true/false
true
Why use subclasses?
- The first is that certain attributes may apply to some but not all entities in the superclass
- The second reason for using subclasses is that some relationship types may be par- ticipated in only by entities that are members of the subclass