Tutorial 2 Chapter 02 Data Models Question
Tutorial 2 Chapter 02 Data Models Question
Chapter 2
Data Models
If you can write precise business rules from a description of operations, database design
is not that difficult.
What are business rules, what is their source, and why are they crucial?
Business rules are precisely written and unambiguous statements that are derived from a detailed
description of an organization's operations. When written properly, business rules define one or more of
the following modeling components:
entities
relationships
attributes
connectivities
cardinalities – these will be examined in detail in Chapter 3, “The Relational Database Model.”
Basically, the cardinalities yield the minimum and maximum number of entity occurrences in an
entity. For example, the relationship decribed by “a professor teaches one or more classes”
means that the PROFESSOR entity is referenced at least once and no more than four times in the
CLASS entity.
constraints
Because the business rules form the basis of the data modeling process, their precise statement is crucial
to the success of the database design. And, because the business rules are derived from a precise
description of operations, much of the design's success depends on the accuracy of the description of
operations.
Note that each relationship definition requires the definition of two business rules. For example, the
relationship between the INVOICE and (invoice) LINE entities is defined by the first two business rules
14
Chapter 2 Data Models
in the bulleted list. This two-way requirement exists because there is always a two-way relationship
between any two related entities. (This two-way relationship description also reflects the implementation
by many of the available database design tools.)
Keep in mind that the ER diagrams cannot always reflect all of the business rules. For example, examine
the following business rule:
A customer cannot be given a credit line over $10,000 unless that customer has maintained a
satisfactory credit history (as determined by the credit manager) during the past two years.
This business rule describes a constraint that cannot be shown in the ER diagram. The business rule
reflected in this constraint would be handled at the applications software level through the use of a
trigger or a stored procedure. (You will learn about triggers and stored procedures in Chapter 8,
“Advanced SQL.”)
15
Chapter 2 Data Models
Review Questions
Data modeling plays a crucial role in simplifying complex real-world events into a
structured format, typically visual. It aids in understanding the intricacies of
systems or environments, which helps database designers communicate
effectively with developers and end users. A well-designed data model can
minimize misunderstandings between the database's intended structure and its
real-world counterpart, reducing the risk of errors during database design.
4. Using Figure P2.4 as your guide, work Problems a–b. The DealCo relational diagram shows
the initial entities and attributes for the DealCo stores, located in two regions of the country.
16
Chapter 2 Data Models
a. Identify each relationship type and write all of the business rules.
: Region to Store: One region can host multiple stores, but each store is
located in one region. This represents a 1:M (one-to-many) relationship.
b. Create the basic Crow’s Foot ERD and Chen ERD for DealCo.
https://drive.google.com/file/d/12kBsxLlzORuAPHwrQ7B2o9wFVUDpLvs2/view?
usp=sharing
17
Chapter 2 Data Models
5. Using Figure P2.6 as your guide, work Problems a−b The Tiny College relational diagram
shows the initial entities and attributes for Tiny College.
18
Chapter 2 Data Models
a. Identify each relationship type and write all of the business rules.
b. Create the basic Crow’s Foot ERD and Chen ERD for Tiny College.
19