Guys I am developing my project in Mysql Workbench and have a confusion about my project.
I have few questions:
How do we manage different types of payments? I mean my DB has a payment table and my system has 3 modes for payment.
1]Credit Card(Will store the respective information)
2]DebitCard(Will store the respective information)
3]Cash on Delivery(the payment is done in cash and will be updated later)
I have uploaded a image here to tell you what I was thinking
Bill table-Consists of bill generation and stuff. Payment table-As to when the payment is done (I have added a type id and fks from all table so that I can use a if/else clause on the select method.) is this good practive? Home table- is the cash on delivery thong
Is there any better method to do this? Please help.
I have further modified the image and have chucked out the type condition and instead I am using the if(payment_type) clause to access the respective DB, I believe this should get the job done. Is there any fault in this? Please help