7 Analysis Phase - Data Modeling
7 Analysis Phase - Data Modeling
3. What type of high-level business rule can be stated by an ERD? Give two examples.
A business rule is a constraint or guideline to follow during operation of the
system. Examples of business rules are: an order belongs to just one customer; a
customer cannot cancel an order that has been shipped; a backorder can be created
for an out of stocks product. Business rules are expressed on ERDs by the kinds
of relationships that the entities share.
4. Define what is meant by an entity in a data model. How should an entity be named? What
information about an entity should be stored in the CASE repository?
An entity is a person, place, thing, or event about which data is collected and
stored. Entities names are nouns. Information stored in a CASE repository
regarding an entity includes:
• Name
• Definition
• Special Notes
5. Define what is meant by an attribute in a data model. How should an attribute be named?
What information about an attribute should be stored in the CASE repository?
An attribute is a characteristic that describes an entity. Attribute names are nouns.
Information stored in a CASE repository regarding an attribute includes:
• Name
• Definition
• Alias
• Sample Values
• Acceptable Values
• Format
• Type
• Special Notes
10. What are metadata? Why are they important to system developers?
Metadata is information we want to collect and document regarding the
components of the data model. Metadata helps us more fully understand the
meaning and use of the data model components. Since there are typically several
members of the project team, specifying metadata helps ensure that each team
member has a consistent understanding of the data model components. Metadata
is usually stored in the
project repository; CASE tools have their own structures for the entry of
metadata.
Metadata is captured to help designers better understand the system that they are
building and to help users better understand the system they will use. The
metadata information can be used to integrate the different pieces of the analysis
phase and can lead to a much better design.
11. What is an independent entity? What is a dependent entity? How are the two types of
entities differentiated on the data model?
Independent entities are entities that can exist without the presence of another
entity. The independent entity does not rely on any other entity in order to exist.
On the other hand, dependent entities require the presence of another entity in
order to exist. These entities rely on attributes from the parent entity to uniquely
identify an instance, and therefore depend on another entity. For example, when
an order is placed for a product, an entity that represents a specific product on a
specific order is usually created. This entity would not exist without the order and
product entities, and in fact gets its identifiers from those entities. So, this
ordered_product entity is a dependent entity. Independent entities are represented
by rectangles, while dependent entities are usually represented as rectangles with
double-border lines.
13. What is the purpose of an intersection entity? How do you know whether one is needed in
an ERD?
An intersection entity is created when we need to capture more information about
the relationship between two entities. This often occurs when two entities have a
many-to-many relationship. One instance of entity A may be related to many
instances of entity B, and one instance of entity B can be related to many
instances of entity A. The intersection entity is
inserted between entities A and B, and is used to capture information about a
specific instance of entity A related to a specific instance of entity B.
17. Describe the analysis that is applied to a data model in order to place it in first normal
form (1NF).
First normal form requires that all repeating fields or groups of fields have been
removed to separate tables.
18. Describe the analysis that is applied to a data model in order to place it in second normal
form (2NF).
Second normal form requires that the data model be in 1NF, and that all partial
dependencies have been removed.
19. 19. Describe the analysis that is applied to a data model in order to place it in third
normal form (3NF). \
Third normal form requires that the data model be in 2NF, and that all transitive
dependencies are removed (i.e., that no fields are dependent on other, non-
primary key fields).
20. Describe how the data model and process model should be balanced against each other.
The key to balancing DFDs and ERDs is to recognize that all system data must be
accounted for on each type of diagram. The ERD shows the system data 'at rest,'
while the DFD shows the flow and use of data in the system. Generally, all of the
data entities shown on the ERDs will correspond to data stores on the DFDs. That
is one aspect of balancing. In addition, the attributes that are a part of the data
model should be used somewhere in the flows and stores of the process models.
21. What is a CRUD matrix? How does it relate to process models and data models?
The CRUD (create, read, update, delete) matrix shows how data is used by the
processes within the system. In the design phase, it helps analysts ensure that all
of the data stores used by the processes have been created. This is a tangible way
to link the processes from the process models and the data stores from the data
model, ensuring that no data required by the processes has been omitted from the
data model. It will also depict data from the data model that is not used by any
processes, and should therefore be considered for elimination from the data
model.
PERFORMANCE TASK: EXERCISES A-F
A. Draw data models for the following entities: • Movie (title, producer, length,
director, genre) • Ticket (price, adult or child, showtime, movie) • Patron (name,
adult or child, age)
B. Draw a data model for the following entities, considering the entities as representing
a system for a patient billing system and including only the attributes that would be
appropriate for this context: • Patient (age, name, hobbies, blood type, occupation,
insurance carrier, address, phone) • Insurance carrier (name, number of patients on
plan, address, contact name, phone) • Doctor (specialty, provider identification
number, golf handicap, age, phone, name)
C. Draw the relationships that follow. Would the relationships be identifying or
nonidentifying? Why? • A patient must be assigned to only one doctor, and a doctor
can have many patients. • An employee has one phone extension, and a unique
phone extension is assigned to an employee. • A movie theater shows many different
movies, and the same movie can be shown at different movie theaters around town
D.
1. Draw an entity relationship diagram (ERD) for the following situations: 1. Whenever new
patients are seen for the first time, they complete a patient information form that asks their
name, address, phone number, and insurance carrier, all of which are stored in the patient
information file. Patients can be signed up with only one carrier, but they must be signed
up to be seen by the doctor. Each time a patient visit the doctor, an insurance claim is sent
to the carrier for payment. The claim must contain information about the visit, such as the
date, purpose, and cost. It would be possible for a patient to submit two claims on the same
day.
2. The state of Georgia is interested in designing a database that will track its researchers.
Information of interest includes researcher name, title, position; university name, location,
enrollment; and research interests. Each researcher is associated with only one institution,
and each researcher has several research interests.
3. A department store has a bridal registry. This registry keeps information about the
customer (usually the bride), the products that the store carries, and the products for
which each customer registers. Customers typically register for a large number of
products, and many customers register for the same products.
4. Jim Smith’s dealership sells Fords, Hondas, and Toyotas. The dealership keeps
information about each car manufacturer with whom it deals so that employees can get in
touch with manufacturers easily. The dealership also keeps information about the models
of cars that it carries from each manufacturer. It keeps such information as list price, the
price the dealership paid to obtain the model, and the model name and series (e.g., Honda
Civic LX). The dealership also keeps information about all sales that it has made. (For
instance, employees will record the buyer’s name, the car the buyer bought, and the
amount the buyer paid for the car.) To allow employees to contact the buyers in the future,
contact information is also kept (e.g., address, phone number, e-mail).
E. Examine the data models that you created for Exercise D. How would the respective models
change (if at all) on the basis of these corresponding new assumptions? • Two patients have the
same first and last names. • Researchers can be associated with more than one institution. • The
store would like to keep track of purchased items. • Many buyers have purchased multiple cars
from Jim over time because he is such a good dealer.
F. Visit a Web site that allows customers to order a product over the Web (e.g., Amazon.com).
Create a data model that the site needs to support its business process. Include entities to show
what types of information the site needs. Include attributes to represent the type of information the
site uses and creates. Finally, draw relationships, making assumptions about how the entities are
related..