I need to come up with a proper data model for the following scenario:
We are building an application on which users can search for categories, stores and products.
1 Store can have multiple Products, 1 Product belongs to only 1 Store
1 Category can have multiple Products, 1 Product can belong to multiple Categories
Originally I wanted to implement Parent/Child relationships as such:
I realize now that this is obviously not possible since a Product can not have more than one parent.
I am thinking now of keeping that Parent/child relation between Stores and Products, and handle categorization with nested Category objects within the Product objects.
I'm wondering if this would be the ideal approach to this? I must also say that Products will be updated on a daily basis or even more frequently, and categories will be added or removed from products regularly as well, if that has any effect on which approach I should take for this problem?