I've carried out a task that tracks shops where a person can purchase a product. I've made the decision to make use of Neo4j because the database.

This really is an element of the database which i are thinking about: There's a node for every shop, and all these nodes has child-nodes that store products available for the reason that store.

Think about this scenario: Now a specific user (who always would go to a particular shop to purchase all his products) really wants to know alternative shops where he is able to get all (or maximum) quantity of the products he really wants to purchase.

However , an thorough search of all of the shops and all sorts of their products, then their matching will require much spaceOrtime. Can there be any procedure/formula that may assist me to solve this issue with minimum space/time cost?

P.S.: Please be aware that I must stick to Neo4j only, since it solves most of the other database problems very effectively.

your use situation is really ideal for a graph db. Could I suggest you implement your products as primary nodes and fasten these to your stores?

Index your store nodes using Indexing Service. That provides you with quick research for store and then for any particular item is a traversal away. Getting other stores to have an item will even you need to be edge traversals at that time.

Hope this can help.