I was debugging my code, and I found that this Aerospike java client code with the set name as "null" works and inserts data in aerospike:
AerospikeClient client = new AerospikeClient("localhost", 3000);
Key key = new Key("test", null, inputPayload.getUuid());//Note that the set name is given as "null"
Bin bin1 = new Bin("segments", inputPayload.getSegments());
client.put(null, key, bin1);
I was able to insert and retrieve the data, but show sets
didn't reveal any set name.
After some debugging I found the data using select * from <namespace>
My question is
- If the data is not stored in a set, then where is it stored?
- We know that aerospike compares to relational database as: namespace == database and set == table. But in relational databases, we are not allowed to insert the data directly in a db, we need to create a table first. And that makes sense. So, why does aerospike allow us to do that with null sets?