I am creating a program that stores customer payments in a database.
It is possible to pay multiple times for one product, but I don’t want to create a separate column for each payment that the customer makes.
I thought about making the number of columns variable by adding a new one after each payment, but this seems like a bad solution to me…
Any suggestions ?
I think the table should look something like this:
ID ClientID ProductID Payment????.....
As in the comments about, you should have a payment table linked to the user tables.
Then to see get payments made by a Customer: