- •Contents
- •Preface
- •Intended Audience
- •About this Guide
- •Typographical Conventions
- •Related Documentation
- •What’s In This Chapter?
- •Chapter Contents
- •What is Data Modeling?
- •Data Modeling Sessions
- •Session Roles
- •Sample IDEF1X Modeling Methodology
- •Logical Models
- •The Entity Relationship Diagram
- •The Key-Based Model
- •The Fully-Attributed (FA) Model
- •Physical Models
- •The Transformation Model
- •The DBMS Model
- •Benefits of Modeling in ERwin
- •What’s In This Chapter?
- •Chapter Contents
- •The Entity-Relationship Diagram
- •Defining Entities and Attributes
- •Logical Relationships
- •Many-to-Many Relationships
- •Validating the Design of the Logical Model
- •Data Model Example
- •What’s In This Chapter?
- •Chapter Contents
- •Understanding Keys
- •Selecting a Primary Key
- •Designating Alternate Key Attributes
- •Inversion Entry Attributes
- •Relationships and Foreign Key Attributes
- •Dependent and Independent Entities
- •Identifying Relationships
- •Non-Identifying Relationships
- •Rolenames
- •What’s In This Chapter?
- •Chapter Contents
- •Naming Entities and Attributes
- •Synonyms, Homonyms and Aliases
- •Entity Definitions
- •Descriptions
- •Business Examples
- •Comments
- •Definition References and Circularity
- •Constructing a Business Glossary
- •Attribute Definitions
- •Rolenames
- •Definitions and Business Rules
- •What’s In This Chapter?
- •Chapter Contents
- •Relationship Cardinality
- •Cardinality in Non-Identifying Relationships
- •Referential Integrity
- •Reading Referential Integrity Options
- •RI, Cardinality, and Identifying Relationships
- •RI, Cardinality, and Non-Identifying Relationships
- •Additional Relationship Types
- •Many-to-Many Relationships
- •N-ary Relationships
- •Recursive Relationships
- •Subtype Relationships
- •Complete Versus Incomplete Subtype Structures
- •Inclusive and Exclusive Relationships
- •IDEF1X and IE Subtype Notation
- •When to Create a Subtype Relationship
- •Introduction
- •Chapter Contents
- •Overview of the Normal Forms
- •Functional Dependence (FD)
- •Full Functional Dependence
- •First Normal Form (1NF)
- •Second Normal Form (2NF)
- •Third Normal Form (3NF)
- •Common Design Problems
- •Repeating Data Groups
- •Multiple Use of the Same Attribute
- •Multiple Occurrences of the Same Fact
- •Conflicting Facts
- •Derived Attributes
- •Missing Information
- •Unification
- •How Much Normalization Is Enough?
- •Conclusions
- •ERwin Support for Normalization
- •First Normal Form Support
- •Second and Third Normal Form Support
- •What’s In This Chapter?
- •Chapter Contents
- •Creating a Physical Model
- •Denormalization
- •Classification of Dependent Entities
- •Glossary of Terms
- •Index
- •Documentation Comments Form
6 |
ERwin Methods Guide |
|
|
ERwin Support for Normalization
ERwin provides some support for normalization of data models, but does not currently contain a full normalization algorithm. If you have not used a “real time” modeling tool before, you will find ERwin’s standard modeling features quite helpful. They will prevent you from making many normalization errors in the first place.
First Normal Form Support
In a model, each entity or attribute is identified by its “name.” ERwin will accept any name for an object, with the following exceptions:
♦ERwin will flag a second use of an entity name (depending on your preference for unique names).
♦ERwin will flag a second use of an attribute name, unless that name is a rolename. When rolenames are assigned, the same name for an attribute may be used in different entities.
♦ERwin will not let you bring a foreign key into an entity more than once without giving it a rolename each time.
By preventing multiple uses of the same name, ERwin is basically leading you to put each fact in exactly one place. There may still be second normal form errors if you place an attribute incorrectly, but no algorithm would find that without more information than is present in a model.
In the data model, ERwin cannot know that a name you assign to an attribute can represent a “list” of things. For example, ERwin was happy to accept “children's-names” as an attribute name in our earlier example. So it does not directly guarantee that every model is in first normal form.
However, the DBMS schema function of ERwin does not support a data type of “list.” Because the schema is a representation of the database in a physical relational system, first normal form errors are also prevented at this level.
88 ∙ Normalization
ERwin Methods Guide |
6 |
|
|
Second and Third Normal Form Support
ERwin does not currently know about functional dependencies, but it can help to prevent second and third normal form errors. For example, if you reconstruct the examples presented earlier in this chapter, you will find that once “spouse-address” has been defined as an attribute of SPOUSE, you cannot also define it as an attribute of CHILD. (Again, depending on your preference for unique names.)
By preventing the multiple occurrence of foreign keys without rolenames, ERwin is reminding you to think about what the structure represents. If the same foreign key occurs twice in the same entity, there is a business question to ask:
Are we recording the keys of two separate instances, or do both of the keys represent the same instance?
When the foreign keys represent different instances, separate rolenames are needed. If the two foreign keys represent the same instance, then there is very likely a normalization error somewhere. A foreign key appearing twice in an entity, without rolenames, is a dead giveaway that there is a redundant relationship structure in the model. When two foreign keys are assigned the same rolename, unification occurs.
Normalization ∙ 89
6 |
ERwin Methods Guide |
|
|
90 ∙ Normalization