I am designing a system where a user can input a budget and a query returns to them sets of objects that they can afford from different vendors. The system has 100s of different combination types (i.e [Knife, Spoon, Fork], [Spoon, Glass, Mug]) so that the query is directed (using nosql database).

The query will look at the different combination types and compare the prices of getting the whole set from different vendors and then throw away any combinations from vendors that are over budget. I'm trying to do this efficiently as if there are 100s (possible 1000s in the future) of different combination types and 4+ vendors, it might be computationally expensive.

My question is, are there approaches to make this less computationally expensive using standard techniques in query building?

  • sounds like a NP hard set matching problem – Ewan Mar 27 '19 at 16:14
  • I've been thinking this through. I could store the last updated price in each set from each vendor and doing all the price calculations in the backend by querying all sets that have a price from more than x-time. How does that sound as an approach? – Samuel Innocent-Primus Mungy Mar 27 '19 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.