By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,316 Members | 2,317 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,316 IT Pros & Developers. It's quick & easy.

Difficulty with table relationships

stonward
100+
P: 145
Hi Folks,

I'm having difficulty trying to model the way a business works that I'm designing a database app for. Specifically, a customer may pay partly in cash and partly by (say) debit card: how do I account for this in my table design? I have a table for payment methods, and a table for payments, but I can't quite figure if this is a 'classic' many to many requiring a join table, or whether to simply have two (or more) records in the payments table covering each part payment (this is my current fave).

Am I missing something obvious?!

Thanks,

stonward
Nov 20 '11 #1

✓ answered by NeoPa

As you say (almost), a one-to-many link between the items on the one side and the payments on the many should be appropriate.

Share this Question
Share on Google+
3 Replies


NeoPa
Expert Mod 15k+
P: 31,707
As you say (almost), a one-to-many link between the items on the one side and the payments on the many should be appropriate.
Nov 20 '11 #2

stonward
100+
P: 145
Thanks for the reply NeoPa - so simply enter multiple payments in the payment table for customers who pay by more than one method at a time?

Thanks
Nov 20 '11 #3

NeoPa
Expert Mod 15k+
P: 31,707
Yes. Each payment needs a link to the item it is paying off, whether partially or in full.
Nov 21 '11 #4

Post your reply

Sign in to post your reply or Sign up for a free account.