Teoman Haliloglu wrote:
> Do you have any ideas about how to fit the time dimension in the PersonRole
> class effectively?
It doesn't seem unreasonable to make a new PersonRole each instance of a relationship.
So you could add pActive as %Boolean to indicate whether the relationship is current.
And pStartTimeStamp and pEndTimeStamp (or pStartDate and pEndDate) to reflect the time 
domain.


> those records all should keep role specific data as well
Subclassing from %Persistent and PersonRole certainly gives you a place to store those 
data.

If a Person is re-hired the prior instance of Employee is not altered.

> What do you suggest as a structure for fast and easy query capability?
- a ten GHz CPU with ten GB RAM.

I suggest making PersonRole abstract since it appears that a query is unlikely to span 
Roles.

As always, an index that matches the query strategy is the most helpful.
So if you are asking for employees of an organization during a time frame, an index on 
Organization, Role, PersonID, and StartDate, could be helpful.
An index on Organization, Role, Status, and PersonID, is probably another useful index.

Reply via email to