rrrkrishnan
Programmer
Have a question regarding the design of a party account relationship table in a financial services model.
Say there can be many parties associated with an account , and there is a role type column which defines the role a party plays on the account and there is a primary party indicator and these two can change.
So the current structure looks like this.
party
account
eff_begin_dt
eff_end_dt
role type
primary party indicator
Now when the role changes say on 2004-01-05, a new version for that relationship is created by setting the eff_end_dt of the existing record to 2004-01-05 and creating a new version with eff_begin_dt as '2004-01-05' and eff_end_dt = '9999-12-31'.
Now when a relationship expires on '2004-02-10', we set the eff_end_dt of the last version to '2004-02-10'.
So we are using the eff_end_dt to expire relationships and also to expire a version of the relationship. This is causing a problem for we cannot tell the difference between relationship expiration and version expiration without a look ahead algorithm (performance issue) to see if an unexpired version of a relationship exists.
Do you think adding an other date column like expiration date and versioning based on that will help.
Would much appreciate it if you can share some ideas, if you've come across this scenario.
Thanks!!!
Say there can be many parties associated with an account , and there is a role type column which defines the role a party plays on the account and there is a primary party indicator and these two can change.
So the current structure looks like this.
party
account
eff_begin_dt
eff_end_dt
role type
primary party indicator
Now when the role changes say on 2004-01-05, a new version for that relationship is created by setting the eff_end_dt of the existing record to 2004-01-05 and creating a new version with eff_begin_dt as '2004-01-05' and eff_end_dt = '9999-12-31'.
Now when a relationship expires on '2004-02-10', we set the eff_end_dt of the last version to '2004-02-10'.
So we are using the eff_end_dt to expire relationships and also to expire a version of the relationship. This is causing a problem for we cannot tell the difference between relationship expiration and version expiration without a look ahead algorithm (performance issue) to see if an unexpired version of a relationship exists.
Do you think adding an other date column like expiration date and versioning based on that will help.
Would much appreciate it if you can share some ideas, if you've come across this scenario.
Thanks!!!