Anyone help with best way to represent/query the following problem
- products can be sold in a store, p1 -> s1, p2 -> s1, p1 -> s2 …
- products can only be sold in a store depending on for example geographic location of store (North, South, East…) and location size (Small, Medium, Large) or combinations of store/product properties. These are constraints which drive which products will be sold in a store.
I would like to be able to ask, I am store s1 what products can I sell?
appreciate any thought on good approach to solving this problem, I was thinking a graph database such as neo4j would be appropriate but have limited experience using these so any pointers would be of value.
you could probably model the locations and the sizes as nodes, and connect the stores to them, then you can do queries over them with Cypher, http://docs.neo4j.org/chunked/snapshot/cypher-query-lang.html, see http://tinyurl.com/d8lnvbm for an example