- •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
3 |
ERwin Methods Guide |
|
|
Rolenames
When foreign keys migrate from the parent entity in a relationship to the child entity, they are serving double-duty in the model in terms of stated business rules. To understand both roles, it is sometimes helpful to rename the migrated key to show the role it plays in the child entity. This name assigned to a foreign key attribute is called a rolename. In effect, a rolename declares a new attribute, whose name is intended to describe the business statement embodied by the relationship that contributes the foreign key.
Rolename Example
The foreign key attribute of PLAYER, “player-team-id.team-id,” shows us the syntax for defining and displaying a rolename. The first half (before the period) is the rolename. The second half is the original name of the foreign key, sometimes called the base name.
Note: Rolenames are also used to model compatibility with legacy data models, where the foreign key was often named differently than the primary key.
Rolenames migrate across relationships just like any other attributes. For example, suppose that we extend the example to show which PLAYERs have scored in various games throughout the season. The “player-team-id” rolename migrates to the SCORING PLAY entity (along with any other primary key attributes in the parent entity), as shown below.
Diagram Showing Migration of a Rolenamed FK Attribute
36 ∙ The Key-Based Model