Let's say I have a set of data where each row is a pair of coordinates: (X, Y). Associated with each point I have arbitrary metadata, such as {color: yellow} or {age: 2 years}.
I'd like to be able to store the data and metadata in such a way that I can query the metadata (eg: [rows where {age: 2 years, color: yellow}]) and in return receive all of the matching coordinate rows.
There are no predefined metadata columns or values, nor will all coordinate rows necessarily have the same metadata columns. What would be the best way to store this data for the fastest access? Would it be possible using something such as Tokyo Cabinet (without Tokyo Tyrant) or SQLite, or is there a better option?