Normalize monthly installment payments

3

I am working on a system to control monthly payments (similar to a tuition payment system), and I am concerned about standardization. For example:

Table quotas

Id_abonado  id_recibo    año      mes   valorcuota pagado
12          1            2016    Enero      100        80
13          1            2016    Enero      100       100
14          2            2016    Enero      100       100 

And if I had 500 subscribers, año and mes would be repeated 500 times and I doubt that this is correct. I was thinking about creating another table that had only the year and the month to refer but I'm not sure. I hope you can help me.

    
asked by Frank 29.09.2016 в 03:21
source

1 answer

1

Normalizing more there does not make much sense in my opinion, because año and mes are constants that will not change in the future. Although normalize and remove año and mes will be practically the same as you have it now. Moreover, if you have many records, that JOIN to that extra table would cost you a little more time to resolve the query.

What I would do is a couple of indexes to improve the time to consult for these fields.

    
answered by 29.09.2016 в 03:36