Part IV. Associations

Associations are important elements of information models. Software applications have to implement them in a proper way, typically as part of their model layer within a model-view-controller (MVC) architecure. Unfortunately, application development frameworks do often not provide much support for dealing with associations.

Table of Contents

11. Reference Properties and Unidirectional Associations
1. References and Reference Properties
2. Referential Integrity
3. Modeling Reference Properties as Unidirectional Associations
4. Representing Unidirectional Associations as Reference Properties
5. Adding Directionality to a Non-Directed Association
6. Our Running Example
7. Eliminating Unidirectional Associations
7.1. The basic elimination procedure restricted to unidirectional associations
7.2. Eliminating associations from the Publisher-Book-Author design model
8. Rendering Reference Properties in the User Interface
9. Collection Types for Multi-Valued Reference Properties
10. Quiz Questions
10.1. Question 1: Meaning of "one-to-one"
10.2. Question 2: When to Check Referential Integrity
10.3. Question 3: Meaning of "Functional"
10.4. Question 4: Object Destruction Dependency
10.5. Question 5: Rendering a Single-Valued Reference Property
10.6. Question 6: Expressing a Functionality Type
12. Implementing Unidirectional Functional Associations with Java, JPA and JSF
1. Implementing Single-Valued Reference Properties in Java
2. Make a JPA Entity Class Model
3. New Issues
4. Write the Model Code
4.1. Summary
4.2. Encode each class of the data model
4.3. Encode the constraints
4.4. Encode getters and setters
4.5. Implement a deletion policy
4.6. Serialization and De-Serialization
5. The View and Controller Layers
5.1. Initialize the app
5.2. Show information about associated objects in the List Objects use case
5.3. Allow selecting associated objects in the create and update use cases
13. Implementing Unidirectional Non-Functional Associations with Java, JPA and JSF
1. Implementing Multi-Valued Reference Properties in Java
2. Make a JPA Entity Class Model
3. New issues
4. Write the Model Code
4.1. Summary
4.2. Encode the entity classes
4.3. Implement a deletion policy
4.4. Serialization and De-Serialization
5. Write the User Interface Code
5.1. Show information about associated objects in the List Objects use case
5.2. Allow selecting associated objects in the create use case
6. Run the App and Get the Code
7. Possible Variations and Extensions
7.1. Set-valued versus ordered-set-valued reference properties
14. Bidirectional Associations
1. Inverse Reference Properties
2. Making an Association-Free Information Design Model
2.1. The basic procedure
2.2. How to eliminate unidirectional associations
2.3. How to eliminate bidirectional associations
2.4. The resulting association-free design model
3. Quiz Questions
3.1. Question 1: Table populations of bidirectional associations
3.2. Question 2: Implications of bi-directionality
3.3. Question 3: Elimination of bi-directional associations
3.4. Question 4: Meaning of bi-directional association
15. Implementing Bidirectional Associations with Java, JPA and JSF
1. Make a JPA Entity Class Model
2. Write the Model Code
2.1. New issues
2.2. Summary
2.3. Encode each class of the data model as an entity class
2.4. Encode the setter operations
2.5. Encode the add and remove operations
2.6. Take care of deletion dependencies
2.7. EntityManagers and Cached Entities
3. Exploiting Derived Inverse Reference Properties in the User Interface
3.1. Show information about published books in the List Publishers use case
4. Run the App and Get the Code
16. Part-Whole Associations
1. Aggregation
2. Composition