sorry if this is a really basic question.
I am thinking about creating a simple DB that stores a large number of pre-generated key and value pair. The key operations that I'll want to perform on this DB is to retrieve any record (that has not yet been retrieved), then either delete it or mark it as read so that I don't retrieve it again.
I considered the use of a relational DB such as Postgres but I can't think of an efficient way to quickly retrieve a single record. I believe if I were to use a limit
it will still end up scanning through a large number of records.
I am not too familiar with NoSQL, and was wondering if this will be a better choice for my usecase? If so, would appreciate getting any information/resources to read up on how I can perform an efficient read & delete on any record using NoSQL.
Thanks in advance!