What Are Entity Associations Good For?

A few different people have asked me in the past week to help them understand what functionality they would be missing if they were to decide not to define any entity associations and instead just use view links to connect their view objects.

By defining (let's say a 1-to-many) association between two entities Dept and Emp, you enable yourself to:

  1. Navigate programmatically (in Java or Groovy) between an instance of Dept and associated Emp instances and vice versa. This can be useful in navigation and business logic
  2. Easily add reference information like a Dname description to a view object based on Emp, and to automatically synchronize that reference information correctly when the foreign key (Emp.Deptno) value changes
  3. Easily define view links by just pointing to the association (since it already captures the attribute pairs involved in the relationship)
  4. Enable LOVs to be configured on the "reference description" field (e.g. "Dept.Dname") and have the related foreign key attribute (Emp.Deptno) be populated when the user chooses a department by name from the LOV.
  5. Leverage runtime "pruning" of attributes and joins when you build a VO with SQL Mode of "Declarative" and you happen to be only showing information related to some of the view objects (see example#141)
  6. See the relationships between their entity objects in a business components diagram

There are probably more. These were just the first six things that popped into my head... I'll update this posting if I think of others.

Comments:

Post a Comment:
Comments are closed for this entry.
About
Search

Categories
Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today