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) architecture. 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 Plain JavaScript
1. Implementing Single-Valued Reference Properties with Plain JavaScript
2. Make a JavaScript Data Model
3. New issues
4. Write the Model Code
4.1. Summary
4.2. Encode each class of the JavaScript data model as a constructor function
4.3. Encode the property checks
4.4. Encode the property 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
6. Quiz Questions
6.1. Question 1: JavaScript data model
13. Implementing Unidirectional Non-Functional Associations with Plain JavaScript
1. Implementing Multi-Valued Reference Properties in JavaScript
2. Make a JavaScript Data Model
3. New issues
4. Write the Model Code
4.1. Encode the add and remove operations
4.2. Implement a deletion policy
4.3. 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
5.3. Allow selecting associated objects in the update use case
6. How to Run the App, Get the Code and Ask Questions
7. Points of Attention
14. Practice Projects
1. Project 1 - Assigning a director and actors to a movie
2. Project 2 - Assigning a capital to a country, as well as members and a headquarter location to an organization
15. 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
16. Implementing Bidirectional Associations with Plain JavaScript
1. Make a JavaScript Data Model
2. Write the Model Code
2.1. New issues
2.2. Summary
2.3. Encode each class of the JavaScript data model as a constructor function
2.4. Encode the property checks
2.5. Encode the setter operations
2.6. Encode the add and remove operations
2.7. Take care of deletion dependencies
3. Exploiting Derived Inverse Reference Properties in the User Interface
3.1. Show information about published books in the List Publishers use case
17. Practice Projects
1. Project 1 - Assigning both directors/actors to movies and movies to directors/actors
2. Project 2 - Assigning cities to a country, as well as members to an organization, and vice versa
18. Part-Whole Associations
1. Aggregation
2. Composition