ch4 Flashcards

1
Q

Explain the concept of a subclass and superclass with the help of an example. What do we call a class/subclass relation?

A

Say you have an entity type PET with an attribute Species. Within the PET entity set, you might have a bunch of entities with Species=Cat. There might also be some additional attributes and relationships that only apply to PET instances with Species=Cat. So it could be useful to create a subclass CAT from the superclass PET. You could give the CAT subclass its own local (specific) attrs like ‘Num_of_lives’ and its own specific relationships like CHASES that it has with a MOUSE subclass. The CAT subclass will still inherit all of the attributes and relationships of the PET superclass, in addition to its own local attributes and relationships.

* what do we call a class/subclass relation?
superclass/subclass relationship
AKA supertype/subtype relationship
AKA class/subclass relationship
AKA IS-A relationship
AKA IS-AN relationship
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define: superclass of a subclass

A

superclass: the ‘parent’ entity type to which a subclass belongs;
subclass: a meaningful subgrouping of entities of a particular type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define: superclass/subclass relationship

A

AKA supertype/subtype relationship
AKA class/subclass relationship
AKA IS-A relationship
AKA IS-AN relationship

the relationship between a superclass and a subclass;
entities of the subclass inherit the attribute(s) and relationships of the superclass;
a member entity of the subclass represents the same real-world entity as some member of the superclass, but in a distinct specific role;
an entity cannot exist in the DB merely by being a member of a subclass, it must also be a member of a superclass
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define: IS-A relationship

A
AKA superclass/subclass relationship
AKA supertype/subtype relationship
AKA class/subclass relationship
AKA IS-A relationship
AKA IS-AN relationship
the relationship between a superclass and a subclass;
entities of the subclass inherit the attribute(s) and relationships of the superclass;
a member entity of the subclass represents the same real-world entity as some member of the superclass, but in a distinct specific role;
an entity cannot exist in the DB merely by being a member of a subclass, it must also be a member of a superclass
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define: specialization

A
the process of defining a set of subclasses of an entity type;
[this entity type is called the superclass of the specialization]; the set of subclasses that forms a specialization is defined on the basis of some distinguishing characteristic of the entities in the superclass
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Define: generalization

A

generalization is the inverse of specialization;
the process of defining a generalized entity type from the given entity types;
a reverse process of abstraction in which we supress the differences among several entity types, identify their common features, and generalize them into a single superclass [“generalized superclass”] of which the original entity types are special subclasses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define: category

A
AKA union type;
a subclass that represents a collection of entities that is a subset of the UNION of  entities from distinct entity types
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Define: specific (local) attributes

A

attributes that are specific to a subclass of a superclass

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Define: specific relationships

A

relationships that are specific to a subclass of a superclass

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Discuss the concept of type inheritance.

A
the type of an entity is defined by the attributes it possesses and the relationship types in which it participates. Because an entity in the subclass represents the same real-world entity from the superclass, it should possess values for its specific attributes as well as values as a member of the superclass.
We say that an entity that is a member of a subclass inherits all the attributes of the entity member of the superclass. The entity also inherits all the relationships in which the superclass participates.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Discuss user-defined and predicate-defined subclasses, and identify the differences between the two.

A
predicate-defined subclasses:
AKA condition-defined subclasses
* when we can determine exactly the entitites that will become members of each subclass by placing a condition on the value of some attribute of the superclass;
* defining predicate: the attribute of the superclass that the constraint is placed on

user-defined subclasses:

  • when we do not have a condition for determining membership in a subclass
  • Membership in a user-defined subclass is determined by the DB users when they apply the operation to add an entity to the subclass; hence membership is specified individually for each entity by the user, not by any condition that may be evaluated automatically
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Explain disjointness and completeness constraints on specialization.

A

disjointness:

  • a specialization may be disjoint or overlapping
  • if the specialization is disjoint: that means that an entity can belong to at most ONE subclass in that specialization
    • ex: superclass=PET, defining predicate=PET.Species = {subclass type}, subclasses=CAT, DOG, MOUSE; a member of the subclass CAT cannot also be a member of the subclasses DOG or MOUSE
  • if the specialization is overlapping: that means that an entity can belong to more than one subclass in that specialization; overlapping is the default
    • ex: superclass=PERSON, subclasses=EMPLOYEE, STUDENT, PARENT; a member of the EMPLOYEE subclass can also be a member of the STUDENT and/or PARENT subclasses

completeness:

  • a specialization can be total or partial
  • if the specialization is total: that means that it is required that every entity in the superclass MUST belong to at least one subclass in the specialization
    • ex: superclass=BANK_ACCOUNT, subclasses=SAVINGS, CHECKING; a bank account must be either a savings or checking account
  • if the specialization is partial: that means that entities of the superclass do not have to belong to any subclasses in the specialization
    • ex: (like if a gym has some intramural sports teams but their policy states that only members can play on them) superclass=GYM_MEMBER, subclasses=BASKETBALL_PLAYER, BASEBALL_PLAYER; a member of the gym can play on a basketball or baseball team, but they don’t have to
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

List some of the insertion and deletion rules that apply to specialization (and generalization) as a consequence of the constraints specified on them.

A
  • Deleting an entity from a superclass implies that it is automatically deleted from all the subclasses to which it belongs
  • Inserting an entity in a superclass implies that the entitiy is mandatorily inserted in all predicate-defined (or attribute-defined) subclasses for which the entity satisfies the defining predicate
  • Inserting an entity in a superclass of a total specialization implies that the entity is manditorily inserted in at least one of the subclasses of the specialization
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the difference between a specialization heirarchy and a specialization lattice?

A

specialization heirarchy:

  • has the constraint that every subclass participates as a subclass in only one class/subclass relationship
  • that is each subclass has only one parent
  • results in a tree structure or strict heirarchy

specialization lattice:

  • a subclass can be a subclass in more than one class/subclass relationship
  • that is each subclass can have more than one parent
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the difference between specialization and generalization? Why do we not display this difference in schema diagrams?

A
  • specialization and generalization are inverses of each other
  • in general, a superclass that was defined thru the generalization process is usually total because the superclass is derived from the subclasses and hence contains only the entities that are in the subclasses
  • in the specialization process, the DB designers typically start with an entity type and then define subclasses of the entity type by successive specialization; that is they repeatedly define more specific groupings of entity types
    • top-down conceptual refinement
  • in the generalization process, the DB designers start with a bunch of entity types and then generalize them
    • bottom-up conceptual synthesis
  • both can end up with the same heirarchy or lattice in the end
  • in practice, its likely that a combo of the 2 processes is employed
  • we do not distinguish between specialization and generalization on diagrams because the decision as to which process was followed in a particular situation is often subjective
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How does a category differ from a regular shared subclass? What is a category used for? Illustrate your answer with examples.

A
  • a category has two or more superclasses that may represent collections of entities from distinct entity types, whereas other super/subclass relationships always have a single superclass
  • with a shared subclass, the subclass entity set is a subset of the intersection of the superclasses; represents AND
  • with a category, the category is a subset of the union of the superclasses; represents OR
  • attribute/relationship inheritence is also more selective with categories because a member of the category only inherits the attributes and relationships of the one superclass of which it belongs
    • whereas with shared subclasses, a member of the shared subclass inherits the attributes of all of its superclasses
  • ex, categories:
    • superclasses=BANK, PERSON, COMPANY; category=OWNER (like of a vehicle); the OWNER is either the BANK, a PERSON, a COMPANY
  • ex, shared subclasses:
    • superclasses=ENGINEER, MANAGER, SALARIED_EMPLOYEE, shared subclass=ENGINEERING_MANAGER; the ENGINEERING_MANAGER must be an ENGINEER, a MANAGER, a SALARIED EMPLOYEE
17
Q

For each of the following UML terms (see Sections 3.8 and 4.6) discuss the corresponding term in the EER model, if any: object

A

UML object == ER entity;

an instance of a class/entity type

18
Q

For each of the following UML terms (see Sections 3.8 and 4.6) discuss the corresponding term in the EER model, if any: class

A

UML class == ER entity type;

a grouping of objects/entities that have the same attributes

19
Q

For each of the following UML terms (see Sections 3.8 and 4.6) discuss the corresponding term in the EER model, if any: association

A

UML association == ER relationship type;

20
Q

For each of the following UML terms (see Sections 3.8 and 4.6) discuss the corresponding term in the EER model, if any: aggregation

A

UML aggregation is a relationship between a whole object and its component parts;
in EER there’s no distinction between aggregation and association: theyre both relationships

21
Q

For each of the following UML terms (see Sections 3.8 and 4.6) discuss the corresponding term in the EER model, if any: generalization

A

[HM] UML generalization == EER subclass/superclass relationship

22
Q

For each of the following UML terms (see Sections 3.8 and 4.6) discuss the corresponding term in the EER model, if any: multiplicity

A

UML multiplicity == ER relationship constraints;

  • UML:
  • uses different notation: min..max, with a * that indicates no maximum limit on participation;
    • multiplicities are placed on the opposite ends of the relationship when compared with the (min, max) notation
23
Q

For each of the following UML terms (see Sections 3.8 and 4.6) discuss the corresponding term in the EER model, if any: attributes

A

UML attributes == ER attributes;

24
Q

For each of the following UML terms (see Sections 3.8 and 4.6) discuss the corresponding term in the EER model, if any: discriminator

A

UML discriminator == ER partial key attribute (for weak entities);

25
Q

For each of the following UML terms (see Sections 3.8 and 4.6) discuss the corresponding term in the EER model, if any: link

A

UML link == ER relationship instance;

26
Q

For each of the following UML terms (see Sections 3.8 and 4.6) discuss the corresponding term in the EER model, if any: link atttribute

A

UML link attribute == ER relationship attribute;

27
Q

For each of the following UML terms (see Sections 3.8 and 4.6) discuss the corresponding term in the EER model, if any: reflexive association

A

UML reflexive association == ER recursive relationship type;

28
Q

For each of the following UML terms (see Sections 3.8 and 4.6) discuss the corresponding term in the EER model, if any: qualified association

A

UML qualified association == ER weak entity

29
Q

Discuss the main differences between the notation for EER schema diagrams and UML class diagrams by comparing how common concepts are represented in each.

A

.

30
Q

How are specialization and generalization used to refine the conceptual schemas during conceptual database design?

A
  • in the specialization process, the DB designers typically start with an entity type and then define subclasses of the entity type by successive specialization; that is they repeatedly define more specific groupings of entity types
    • top-down conceptual refinement
  • in the generalization process, the DB designers start with a bunch of entity types and then generalize them
    • bottom-up conceptual synthesis
  • both can end up with the same heirarchy or lattice in the end
  • in practice, its likely that a combo of the 2 processes is employed
31
Q

What aggregation feature is missing from the EER model? How can the EER model be further enhanced to support it?

A

aggregation: the concept for building composite objects from their component objects;

3 cases where aggregation can be related to the EER model:
1. we aggregate attribute values of an object to form the whole object
2. we represent an aggregation relationship as an ordinary relationship
3 (EER doesnt provide for explicitly). the possibility of combining objects that are related by a particular relationship instance into a higher-level aggregate object
** sometimes useful when the higher-level aggregate obj is itself to be related to another object

  • EER can be further extended to allow higher-level aggregate objects by allowing for composite or molecular objects
32
Q

What are the main similarities and differences between conceptual database modeling techniques and knowledge representation techniques?

A
  • both disciplines use an abstraction process to identify common properties and important aspects of objects in the miniworld (called the domain of discourse in KR) while suppressing insignificant differences and unimportant details
  • both disciplines provide concepts, relationships, constraints, operations, and languages for defining data and representing knowledge
  • KR is generally broader in scope than semantic data models. Different forms of knowledge, such as rules (used in inference, deduction, and serach), incomplete and default knowledge, and temporal and spatial knowledge, are represented in KR schemes. DB models are being expanded to include some of these concepts.
  • KR schemes include reasoning mechanisms that deudce additional facts from the facts stored in a DB. Hence whereas most current DB systems are limited to answering direct queries, knowledge-based systems using KR schemes can answer queries that involve inferences over the stored data. DB tech is being extended with inference mechanisms.
  • Whereas most data models concentrate on the representation of the DB schemas, or meta-knowledge, KR schemes often mix up the schemas with the instances themselves in order to provide flexibility in representation exceptions. This often results in inefficiencies when these KR schemes are implemented, especially when compared with DBs and when a large amount of structured data (facts) needs to be stored.
33
Q

One commonly used definition of ontonogy is a specification of a conceptualization. Explain.

A
  • conceptualization is the set of concepts and relationships that are used to represent the part of reality or knowledge that is of interest to a community of users;
  • specification refers to the language and vocabulary terms that are used to specify the conceptualization
  • the ontology includes both a specification and conceptualization; the same conceptualization may be specified in two different languages giving two separate ontologies;
  • the study of ontologies attempts to describe the concepts and relationships that are possible in reality through some common vocabulary; therefore it can be considered as a way to describe the knowledge of a certain community about reality