I need to save the following format in Aerospike:
{"name": "interest",
"datamap" : [
{"sports":"soccer"},
{"color":"green"}],
"clientId":"100",
"eventTagId": 78932
}
Here clientId
is a key.
I can save name: interest
for a single key(clientId
) as ‘name’ will be the bin name and ‘interest’ will be its value.
But, if I have a bin with multiple values for a single key like the following example:
datamap" : [
{"sports":"soccer"},
{"color":"green"}]
so how to store in Aerospike? I need a solution which does not give me hard time when I have to retrieve millions of records. I was thinking in a way to create another set for datamap
with clientId
as a key, and later perform JOIN operation on them. But I think it is an old relational DB solution. Your suggestions will be highly appreciated.