True-False Questions
1.
ER models capture the behavioral aspects of entity classes.
Answer: False Page Reference: 189 Difficulty: Moderate
2.
Conceptual data model precedes object-relational modeling in the
systems development process.
Answer: True Page Reference: 189 Difficulty: Moderate
3.
Use cases provide full descriptions of all user requirements.
Answer: False Page Reference: 192 Difficulty: Moderate
4.
Entity classes are data intensive.
Answer: True Page Reference: 192 Difficulty: Moderate
5.
Properties and characteristics of classes are represented as operations.
Answer: False Page Reference: 193 Difficulty: Moderate
6.
All candidate keys are primary keys.
Answer: False Page Reference: 194 Difficulty: Moderate
7.
A primary key’s value should change from time to time.
Answer: False Page Reference: 194 Difficulty: Moderate
8.
System-generated object identifiers are rapidly replacing primary keys
as the preferred method for object identification.
Answer: False Page Reference: 195 Difficulty: Moderate
9.
A personal or business address is typically represented as a composite
attribute.
Answer: True Page Reference: 196 Difficulty: Moderate
10. Composite attributes are often
defined as separated classes.
Answer: True Page Reference: 196 Difficulty: Moderate
11. The range defined by a
relationship’s minimum and maximum cardinalities makes up its multiplicity.
Answer: True Page Reference: 198 Difficulty: Moderate
12. A ternary relationship can be
represented as three binary relationships.
Answer: False Page Reference: 198 Difficulty: Moderate
13. Representing the purpose of the
multiplicities in unary relationship can be facilitated using roles.
Answer: True Page Reference: 199 Difficulty: Moderate
14. The relationship class in a
ternary relationship usually is a 0..n multiplicity.
Answer: True Page Reference: 199 Difficulty: Moderate
15. Associative classes typically
represent one-to-many relationships.
Answer: False Page Reference: 200 Difficulty: Moderate
16. In a composition, the “part”
object is owned by only one “whole” object.
Answer: True Page Reference: 203-204 Difficulty: Moderate
17. The taxonomy of biological
classifications is an example of generalization relationships.
Answer: True Page Reference: 205 Difficulty: Moderate
18. Generalization is a form of
aggregation.
Answer: False Page Reference: 205-206, 202-204 Difficulty: Moderate
19. Multiple inheritance is supported
in all object-oriented programming languages.
Answer: False Page Reference: 207 Difficulty: Moderate
20. The pieces of a composite
attribute are called derived attributes.
Answer: False Page Reference: 207, 196 Difficulty: Moderate
Multiple-Choice Questions
21. Which of the following UML
features are NOT found in the ER model?
a.
Entities
b.
Relationships
c.
Attributes
d.
Operations
Answer: d Page
Reference: 189 Difficulty: Easy
22. The logical data modeling process
involves:
a.
construction of an object-relational database.
b.
identifying entity classes,
relationships, and attributes.
c.
converting entities and relationships to object-relational format.
d.
obtaining user requirements using top-down or bottom-up approaches.
Answer: c Page
Reference: 189 Difficulty: Moderate
23. The ____________ data modeling
perspective utilizes business documents such as computer displays and reports
for generating models.
a.
document-driven
b.
transactional
c.
bottom-up
d.
inside-out
Answer: c Page
Reference: 191 Difficulty: Moderate
24. In UML notation, a rectangle
whose designation in the top third is :Employee indicates:
a.
the Employee class.
b.
a generic anonymous Employee instance.
c.
an associative Employee class.
d.
the role used by the Employee class in a relationship.
Answer: b Page
Reference: 193 Difficulty: Hard
25. An object may have one or more
attribute combinations that differentiate it from all other objects; these
attribute combinations are called:
a.
candidate keys.
b.
differentiators.
c.
object identifiers.
d.
stereotypes.
Answer: a Page
Reference: 194 Difficulty: Moderate
26. An object’s identifier is called
a(n):
a.
unary attribute.
b.
cardinality.
c.
instance marker.
d.
primary key.
Answer: d Page
Reference: 194 Difficulty: Moderate
27. When selecting a primary key it
is important to avoid use of ____________ attributes.
a.
multiple
b.
intelligent
c.
unique
d.
constant-valued
Answer: b Page
Reference: 195 Difficulty: Moderate
28. In UML notation, the easiest way
to specify that an attribute is a primary key is via a(n):
a.
data type.
b.
association role.
c.
stereotype.
d.
derivation.
Answer: c Page
Reference: 195 Difficulty: Hard
29. A disadvantage of using
system-generated object identifiers as primary keys is:
a.
space requirement.
b.
non-uniqueness.
c.
multi valued attributes.
d.
null values.
Answer: a Page
Reference: 195 Difficulty: Moderate
30. Which of the following constructs
is most likely to require specification via a stereotype in UML?
a.
Creation of an associative class
b.
Specification of an association’s multiplicity
c.
Identification of an object’s role in a relationship
d.
Designation of an attribute as multivalued
Answer: d Page
Reference: 195 Difficulty: Moderate
31. In an object-oriented data model,
a composite attribute is best represented as a(n):
a.
separate class.
b.
association.
c.
composition.
d.
derived attribute.
Answer: a Page
Reference: 196 Difficulty: Moderate
32. The number of classes that
participate in a relationship is called its:
a.
multiplicity.
b.
aggregation.
c.
cardinality.
d.
degree.
Answer: d Page
Reference: 197 Difficulty: Moderate
33. The most commonly used
relationship degree is:
a.
unary.
b.
binary.
c.
ternary.
d.
n-ary.
Answer: b Page
Reference: 197 Difficulty: Moderate
34. In a ternary or higher degree
relationship it is advisable to represent the relationship as a(n):
a.
aggregation.
b.
multi valued attribute.
c.
separate class.
d.
composite attribute.
Answer: c Page
Reference: 198 Difficulty: Moderate
35. The right-most number of a
multiplicity indicates its:
a.
minimum cardinality.
b.
maximum cardinality.
c.
minimum degree.
d.
maximum degree.
Answer: b Page
Reference: 199 Difficulty: Moderate
36. If no object is subordinate to
any other in a relationship, that relationship is a(n):
a.
association.
b.
cardinality.
c.
composition.
d.
generalization.
Answer: a Page
Reference: 200 Difficulty: Moderate
37. Associative classes are most
appropriate for representing:
a.
generalization.
b.
class identifiers.
c.
user roles.
d.
many-to-many relationships.
Answer: d Page
Reference: 200 Difficulty: Moderate
38. A composition is a strong form of:
a.
generalization.
b.
aggregation.
c.
identification.
d.
stereotyping.
Answer: b Page
Reference: 203 Difficulty: Moderate
39. The main advantage of composite
structure diagrams is their ability to:
a.
provide detail.
b.
express cardinality.
c.
reduce clutter.
d.
model composition.
Answer: c Page
Reference: 204 Difficulty: Moderate
40. Supertypes and suptypes form
_______________ relationships.
a.
aggregation.
b.
composition.
c.
association.
d.
generalization.
Answer: d Page
Reference: 205 Difficulty: Moderate
41. In UML notation, the type of
relationship in which deletion of the whole implies deletion of the parts will
be represented symbolically as a:
a.
dashed line with an unfilled diamond.
b.
solid line with an unfilled diamond.
c.
solid line with a filled diamond.
d.
dashed line with a filled diamond.
Answer: c Page
Reference: 203-204 Difficulty: Moderate
42. Which of the following is a
generalization relationship?
a.
Building and House
b.
Department and Employee
c.
Team and Player
d.
Recipe and Ingredient
Answer: a Page
Reference: 205-206 Difficulty: Moderate
43. An object regarding an employee’s
work payment has an hourly rate attribute, a number-of-hours-worked attribute,
and a total-pay attribute which is calculated by multiplying the hourly rate by
the number of hours worked. The total-pay attribute is a ____________
attribute.
a.
generalized
b.
derived
c.
multi valued
d.
composite
Answer: b Page
Reference: 207 Difficulty: Moderate
Essay and Problem-Solving
Questions
44. What is a conceptual data model?
At which stage in the system development process does conceptual data modeling
occur? What are the steps that make up the process of conceptual data modeling?
Identify the traditional approach to conceptual data modeling and compare it to
the object-oriented approach.
Answer:
A
conceptual data model is a representation of organizational data, usually
presented in graphical form that shows the structure and interrelationships
among data elements in an implementation-independent manner. Conceptual data
modeling is one of the requirements structuring tasks, and is done after
requirements determination, preceding logical data modeling. The first step is
a study of existing data models, use cases, and other requirements. Then an
initial conceptual data model is developed. The model is then checked for
completeness, and if not complete, an iterative process of meeting with users,
revising requirements, and refining the model takes place. Once the model is
determined to be complete, it becomes the basis of the next phase of systems
development, which is logical modeling.
The
traditional approach to conceptual data modeling is based on the entity
relationship model; this is contrasted with UML-based object-oriented data
models. ER models are similar to UML, but not as expressive. Whereas ER models
are limited to entities, attributes, and relationships, UML data models can be
extended into full-fledged class diagrams, including a richer variety of
relationship types as well as generalization and behavioral representations.
Page
Reference: 189-190 Difficulty: Moderate
45. Name and describe several (at
least five) categories of questions to consider when developing accurate and
complete data models. For each category, discuss a few specific pieces of
information that should be obtained from system users or business managers.
Answer:
Categories
of questions include: issues related to the classes, their attributes and
identifiers, as well as relationships such as associations, aggregations,
compositions, and generalizations. Furthermore, time dimensions, integrity
constraints, and security controls should be considered. Specifically, users
and business managers should be queried to find which objects are of
importance, what are their defining characteristics, and how are they uniquely
identified. Part-whole, supertype-subtype, and loose relationships should be
identified and their cardinalities established. Users and managers should be
asked how long the data should be kept, and what to do with obsolete data.
Limitations and constraints on data values and relationships should be
determined. Finally, access to data should be controlled, with full accounting
for who is allowed to view, modify, or delete each type of object in the
system.
Page
Reference: 190-191 Difficulty: Moderate
46. Give a complete but concise
definition of the term “attribute” as it relates to conceptual data models. How
are attributes represented in UML class diagrams? What kinds of information can
you specify about attributes in a UML class diagram? Discuss the concept of a
composite attribute, a multivalued attribute, and a derived attribute, and give
examples of each. How do you identify an attribute as composite in a UML
diagram? How do you identify an attribute as multivalued in a UML diagram? How
do you identify an attribute as derived in a UML diagram?
Answer:
An
attribute is a named property of a class containing information about the
object. Attributes are represented in the class diagram within the second of
three rectangles of a class box, and are generally named with a noun.
Information about the attribute will include the name, the type of data that
the attribute’s values must conform to, and optionally additional information
indicating special kinds of attributes, such as keys or multivalued attributes.
A composite attribute is one that contains several separate pieces. For
example, a person’s address may be considered to be a composite attribute
because it includes a residence number, street, city, state, and zip code.
Composite attributes are generally represented in UML as separate classes (to
describe the data type) and the attribute itself is specified to be a property
of whose data type is the class in question. A multivalued attribute is one
that can simultaneously have several different values. For example, a person
may have several phone numbers (cell phone, home phone, etc.). A derived
attribute is one whose value can be determined based on some calculation
performed on other data in the model. An example of this is an employee’s total
pay, which can be calculated based on the hourly wage and the hours worked.
Derived and multivalued attributes are designated via stereotypes in UML class
diagrams.
Page
Reference: 193-196 Difficulty: Moderate
47. Discuss the approach used in
conceptual data modeling for uniquely identifying objects of a data class via
keys. What is a unique identifier composed of? What is the term for a potential
unique identifying key? What is the term for the unique key selected by the
designer of the class? List four rules of thumb for selecting an identifier,
and discuss how unique identifiers are symbolized in a UML class diagram.
Finally, define the concept of an “object identifier” and discuss why this is
generally not used for unique identification in database classes.
Answer:
In
conceptual data modeling, objects of a data class are identified via an
attribute or combination of attributes whose value(s) uniquely characterize the
object. A combination of attributes that uniquely characterize an object is
called a candidate key, and each candidate key for a class is a potential
identifier. The candidate key that is selected by the designer for object
identification is called a primary key. There are four rules of thumb for
selecting a primary key. First, select attributes whose values will not change
during the lifetime of the object. Second, select attributes that are
guaranteed to have valid, non-null values. Third, avoid using intelligent keys,
where part of the key indicates a classification or location code. Finally, if
the only available candidate keys are composed of many attributes, consider
adding a new single attribute as a surrogate key. When creating a UML class
diagram, there is no standard symbol that represents a primary key. Therefore,
it is common practice to create a stereotype to specify the attribute that will
be used as the primary key. In object-oriented systems, an “object identifier”
is a system-generated value used to uniquely identify the object, but because
it is generally a very long and semantically meaningless value, and because
most DBMSs have traditionally used primary keys for identification, object
identifiers are not widely used for identification in database tables.
Page
Reference: 194-195 Difficulty: Moderate
48. Discuss the concept of a
relationship in conceptual data modeling. What is the purpose of a
relationship? Describe three different degrees of relationships and give an
example of each.
Answer:
Relationships
are the glue that holds together the elements of a data class diagram. They
represent semantic connections among objects of one or more classes.
Relationships can connect objects between one or more classes together; the
number of classes involved in a relationship is called its degree. The most
common degrees are unary and binary. A unary relationship is one that binds
objects from the same class together. An example of this would be a
supervisor-subordinate relationship between employees; here the relationship is
between one employee and the other, so only one class would be involved. A
binary relationship is one that binds objects from one class with objects from
a second class. An example of this is the relationship between a student and a
major. There are two classes here, one for student and one for major. Another,
less common, relationship degree is the ternary degree, which binds three
classes together. For example, there may
be a ternary relationship between a part, vendor, and warehouse. In this case a
particular vendor ships a particular part to a particular warehouse. In
principle there could be n-ary degrees, which bind objects from n
classes together, although in practice it is rare for there to be a higher
degree than ternary.
Page
Reference: 196-197 Difficulty: Moderate
49. How are relationships represented
in UML diagrams? Identify the different components of relationship, including
cardinalities, multiplicities, and roles. Give examples of the most common
multiplicities, and the types of relationships that they represent, and show
the symbol used for a multiplicity in UML diagrams.
Answer:
In
a UML diagram, a relationship is represented via a solid line connecting two or
more classes. Each class plays a role in a relationship. A class may play one
role in one relationship and another role in a second relationship. Each end of
a relationship, connected to a class, has a specified minimum cardinality
indicating the minimum number of instances of the class that must be included
in the relationship, and a maximum cardinality indicating the maximum number of
instances that can be included. The range defined by the minimum and maximum
cardinalities is the multiplicity of a role in the relationship. For example, a
multiplicity of 0..n indicates a minimum cardinality of 0 and a maximum
cardinality of n (or many). In UML notation, a multiplicity of 1..10 indicates
a minimum cardinality of 1 and a maximum cardinality of 10; in this case, since
there is a specified upper and lower bound, this is referred to as multiplicity
with fixed cardinality. A relationship in which one multiplicity has a maximum
cardinality of 1 and the other has a maximum cardinality of n is called a
many-to-many relationship. A relationship that is n:m is a many-to-many
relationship, and one that is 1:1 is a one-to-one relationship.
Page
Reference: 196-200 Difficulty: Moderate
50. What is an associative class?
Under what circumstances is it necessary to use an associative class in a
conceptual data model? What is the primary key composed of in a typical
associative class? What relationship of multiplicity and degree is implied by
an association class? How is an associative class’s connection to other classes
represented in a UML class diagram?
Answer:
An
associative class is a class that denotes a many-to-many relationship between
two other classes. An associative class becomes necessary when the many-to-many
relationship itself contains an attribute that cannot be applied to either of
the classes on each side of the relationship; in other words, attributes that
describe something about the relationship between the objects rather than the
objects themselves. Another factor that makes it appropriate to model the
relationship as an associative class is if it represents, in addition to the
many-to-many relationship, another object in its own right that contains relationships
to other classes in the system. The primary key of an associative class is
composed of a concatenation of the primary keys of each of the two other
classes in the many-to-many relationship. In a UML class diagram, the
associative class is represented as a normal class rectangle, but instead of a
solid line connecting it directly to another class, there is a dotted line
connecting the associative class to the solid line that represents the
many-to-many relationship between the two other classes.
Page
Reference: 200-202 Difficulty: Moderate
51. Define the concept of a
generalization relationship. Why is it advantageous to use a generalization
relationship for conceptual data modeling? Describe at least two pitfalls that
can occur when using this type of relationship.
Answer:
A
generalization relationship is based on the inheritance concept and links
supertypes to subtypes. It is sometimes called an “is-a” relationship because
the subtype is a specialized version of the supertype. Generalization is
advantageous because it allows for reuse of attribute definitions, and
eliminates the need to repeat attributes in the subclasses of the relationship.
However, if more than one type of generalization relationship exists between
the superclass and the subclass, multiple inheritance is required to account
for all possible combinations of specialization. This is complicated to do, and
not all software languages tools support multiple inheritance. A second pitfall
pertains to the possibility of overlap in subclass categories. If an instance
of the superclass may belong to both subclasses, this cannot be represented in
standard object-oriented models.
Page
Reference: 205-207 Difficulty: Moderate
No comments:
Post a Comment