Re: Representation for Heterogeneous Attribute Set

From: Carl Federl <cfederl_at_yahoo.com>
Date: 11 Feb 2005 14:00:13 -0800
Message-ID: <1108159213.055145.252880_at_g14g2000cwa.googlegroups.com>


I ran into a similar problem with a Rent and Royalties business domain about 20 years ago.
I found that instead of the typical attribute modeling approach, such as in Joe Celko's example, define the appropriate specialized sub-classes based on the algorithms.

Here is a simple example with Loans where the Interest Calculation method changes over time.

Create table Loans ( Loan_PrimaryKey , StartDate, TermYears , ....)

  • For the Mortgage Interest Algorithms where the InterestMethod is either Fixed or Variable at any point in time Loan_Interest ( Loan_PrimaryKey , StartDate , InterestMethod )
  • Here is the sub-type for the Fixed algorithm: Loan_Interest_Fixed ( Loan_PrimaryKey , StartDate , InterestRate )
  • Here is the sub-type for the Variable algorithm: Loan_Interest_Variable ( Loan_PrimaryKey , StartDate, InterestMarginRate, InterestIndex_PrimaryKey )

Similary, there would be algorithm tables for each of the other Loan algorithm factors such as for Balloon Payments, Payment Frequency, Insurance, etc. Each of these could have their sub-classes which could have sub-classes.

These same structures could be used for regardless if a Loan is for a Home Mortgages, Home Equity or Line of Credit.

Hope this Helps. Received on Fri Feb 11 2005 - 23:00:13 CET

Original text of this message