Suppose we have a dictionary that maps keys to sequences of values - for example:
- potato: A, B, C
- tomato: B
- lettuce: C
- carrot: A, C
- cucumber: C
I would like to perform queries such as:
- query A, B, C returns potato
- query C returns lettuce, cucumber (order shouldn't matter)
I understand that the reverse dictionary lookup could be done with normalized relational databases (as suggested in this post). However, my intuition is that a non relational database could better fit this problem, like a graph. Additionally, I'm looking for something read-optimized.
Is there a NoSQL database that fits this kind of problem? Where should I direct my search for such an implementation?