I have 3 SQL tables: App, Marketplace, and Category.
These entities have the following relationships:
- A marketplace has many apps. (one to many)
- A marketplace has many categories. (one to many)
- A app has many categories.
- A category belongs to many apps. (many to many)
I came up with this:
This almost works, but the problem is that I can create a app from a marketplace that has categories that don't belong to that marketplace. I'd like to enforce that if it's possible and haven't been able to come up with a solution.
