I have an usecase where I need to have a DS something like below
EmpName | SN
-------------
Alex | 1
Chris | 2
I just want to insert an Employee name here, SN should be auto generated serially.
How can I do this in cassandra?
I have an usecase where I need to have a DS something like below
EmpName | SN
-------------
Alex | 1
Chris | 2
I just want to insert an Employee name here, SN should be auto generated serially.
How can I do this in cassandra?
In general you don't want to do this in a distributed environment as it requires a read before writing.
UUID's are the best way of solving this problem. Have the client create one and insert it as the serial.