I need to implement a database design for a loan system.
We have 3 types of loans, and every loan have at least one subtype. For example:
- Loan A
- type A1
- type A2
- Loan B
- loan B1
- loan B2
Every subtype has different data that is needed in order to approve the loan. They don't have any common question, however, I need to access all the types from a single table, for some requirements.
What I tried was to create a "LoanType" table, and use an XML field to store the parameters for that particular sub-type. For example, for loan A:
<type name="A1">
<parameterName>P1</parameterName>
</type>
Although I can access all the tags in the XML based on the name (I'm using DB2 as DBMS, and it has support for XML fields) I don't now how to populate the data from it
Another approach that seems interesting is to use one of this approaches, particularly Class Table Inheritance, but I think that is not a good approach for this.
Any help will be appreciated.
Regards