So, i have 1 table which contain payments with different type
id| reference_id | amount | type 1 | null | 200 | debit 2 | 1 | 25 | refund 3 | 1 | 175 | refund 4 | null | 0 | regist 5 | 4 | 100 | debit
as you can see, this is one entity named payment, each row MAY has relation to another row,
There is another way to represent this data by separating each type to their own tables. I will need debit_payment, refund_payment, regist_payment, and so on.
Which one is the best for this ? especially when we need to show list of the payment, and we also need to get their relation.