
- •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 |
|
|
Unification
In the example below, the “employee-id” attribute migrates to the CHILD entity through two relationships – one with EMPLOYEE and the other with SPOUSE. You might expect that the foreign key attribute would appear twice in the CHILD entity as a result. However, because the attribute “employee-id” was already present in the key area of CHILD, it is not repeated in the entity even though it is part of the key of SPOUSE.
Unification of the “Employee-id” Foreign Key Attribute
This combining of two, identical foreign key attributes migrated from the same base attribute through two or more relationships is called unification. In the example, “employee-id” was part of the primary key of CHILD (contributed by the “has” relationship from EMPLOYEE), and was also a nonkey attribute of CHILD (contributed by the “has” relationship from SPOUSE). Because both foreign key attributes are the identifiers of the same EMPLOYEE, it is desirable that the attribute appears only once. Unification is implemented automatically by ERwin when this situation occurs.
The rules that ERwin uses to implement unification include:
1.If the same foreign key is contributed to an entity more than once, without the assignment of rolenames, all occurrences unify.
2.Unification does not occur if the occurrences of the foreign key are given different rolenames.
3.If different foreign keys are assigned the same rolename, and these foreign keys are rolenamed back to the same base attribute, then unification will occur. If they are not rolenamed back to the same base attribute, there is an error in the diagram.
84 ∙ Normalization

ERwin Methods Guide |
6 |
|
|
4.If any of the foreign keys that unify are part of the primary key of the entity, the unified attribute will remain as part of the primary key.
5.If none of the foreign keys that unify are part of the primary key, the unified attribute will not be part of the primary key.
Accordingly, you can override the unification of foreign keys when necessary by assigning rolenames. If you want the same foreign key to appear two or more times in a child entity, you can add a rolename to each foreign key attribute.
Normalization ∙ 85