I am stumbling when it comes to how to deal with a database design. I have looked around and found examples like http://www.tomjewett.com/dbdesign/dbdesign.php?page=manymany.php which would work quite well for a shop selling items but I want to build a database that would track sales (or trades) between two users.
Ex John trades cards x1, x2, x3, x4 for Jane’s (4 * y1), y2, and $5.00. (In this example John trades four cards, named x1, x2, x3, x4 for 5 of Jane’s cards, 4 of a card named y1, 1 named y2 and $5.00.)
I would also want Jane to be able counter offer to John for extra cards, or whatever she might want to balance it out in her mind.
Thank you in advance
This is an interesting example of a relational DB design. Essentially, my recommendation would be to create a structure that is as normalized as possible. That means basically that you want to create tables such that you can fill in the blank: “a row in this table represents a unique __.”
For your particular application, I would suggest: