Table scheme question....

Hi...

I am getting grey hair...i don't now the right setup for the solution. Maybe you can help?..

Concept.

companyX has for each period (1 year, 2 years ect) different 5 values....

So for example: 2 years...has the value rates of 3%, 4%, 6%, 7% 5 years...has the value rates of 4%, 6%, 6%, 9%

Can anyone help how my table scheme looks like...or multiply tables??

remco

Hi...

I am getting grey hair...i don't now the right setup for the solution. Maybe you can help?..

Concept.

companyX has for each period (1 year, 2 years ect) different 5 values....

when I hear "five values" I think "five fields". Or, in ruby, five attr_accessors, or five instance variable.

I think of the periods as either records or rows, or, in ruby: objects (if that helps).

So for example: 2 years...has the value rates of 3%, 4%, 6%, 7% 5 years...has the value rates of 4%, 6%, 6%, 9%

That's the desired output? It's not meaningful to me; I have no idea what that's supposed to convey. Do you want:

2 years rates in percentages : 3,4,6,5 5 years rates in percentages : 4,6,6,9

If so, why? What does it mean? A five year loan at four percent? or six percent? Which one?

Can anyone help how my table scheme looks like...or multiply tables??

remco

table: quarters

year quarter 2007 1 2007 2 ...

table: rates

rate 3 5 5 6

one-to-many relation between "quarters" and "rates" so that query results are along the lines of:

year quarter rate 2007 1 3 2007 1 4 2007 2 5

However, that doesn't make sense to me because *why* would there be:

2007 quarter 1 3% rate 2007 quarter 1 4% rate

Also, it's kind of silly to have a "rates" table which just has a list of integers, but the alternative is to put the year and quarter into one field giving:

year & quarter rate

[...]

Example, check > http://www.renteoverzicht.nl/hypotheekrenteoverzicht.php

[...]

table: five year

lender NHG rate1 rate2 rate3 rate4