Designing Unique Keys(Primary Keys) for a heavily denormalized NoSQL database

前端 未结 1 1021
别跟我提以往
别跟我提以往 2021-01-26 01:47

I am working on a web application related to Discussion forums using Java and Cassandra database.

I need to construct \'keys\' for the rows storing the user\'s details

相关标签:
1条回答
  • 2021-01-26 02:38

    Is this a distributed application?

    Then you could use a simple synchronized counter and initialize it on startup with the next available id.

    On the other hand a database should be able to handle the UUID hashes as created by java. This is a standard for creating things like sessionIds, that need to be unique. Your problem is somewhat similar since a session in your context would represent a set of user input.

    0 讨论(0)
提交回复
热议问题