Auto-generate an id for a particular data in aerospike

I am new to aerospike and am still trying to understand the architecture and functioanlity and uses of aerospike. I am familier with MongoDB, MySQL.

I in mongoDB when we inser data an ObjectId is created and returned but Aerospike is a key-value database so I am wondering if it can be used in the same way.

For example: If I am saving some Person data in DB, Do I need to create a uid for the Person or it is auto generated by the database as in this scenerio I only have JSON data value for the person.

I know that for a particular key Aerospike can generate a digest key and it can scale both vertically and horizontally, a bin can contains a json data as well.

I am using Aerospike NodeJS client and trying to do queries like: find all data in sets/a particular bin or data from bin within bins. Also how can I use AQL with NodeJS client…

Not sure if I understood the question, the Key which is converted to a 20 bytes digest is a unique ID. If you are asking about AUTO-INCREMENT, that wouldn’t be practical to implement in Aerospike, being a distributed database, without a significant coordination penalty and use of strong-consistency.

For evidence on why AUTO-INCREMENT would be impractical see “Coordination Avoidance in Database Systems” by Peter Bailis, et al.