Database design - non-identifying relationships

  • I have a payments table, and a payment can be cash or direct debit. If it is direct debit it will link to a direct debit

    instruction. I want a field to link to this instruction so I can identify how many payments have been made against this debit

    instruction. This is a non-identifying relationship. If it is a cash payment there will be no value in this field as it is a

    one-off, so for each cash payment this value will be null. Is this bad programming? Should I split them out to a table per

    payment type, which then means if I want to amalgamate them (which I will have to do a lot for reports) that I have to do UNION queries

  • Why not just use an associative table with the payment PK and debit instruction PK?

    --Jonathan



    --Jonathan

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply