sql - Mysql Best way to check date and insert division of payments -


i designing payments table students available payment terms monthly, quarterly, semestral, , annual. grade levels elementary senior highschool. first time im designing tables involving money , schedules of payment. know there's need sum, check date penalty , divide tuition fee based on selected payment term.

where start?

paymentterm

id pk term 

gradelevel_fee

id gradelevel_id fee_id 

student_tuition

id pk sum(gradelevel_fees) balance paymentterm_id 

student_payments

id student_id payment_id 

payment

id amountofpayment dateofpayment 

where or how can implement checking of due date? should put due date under student_tuition table?

anything important missed?

i'd appreciate suggestion.

thanks.

the due date must put table not repeating student_id, can put in primary table, or in table storing record without student_id duplication.

its placed in paymentterm table.

hope helps


Comments