Many optimistic concurrency examples refer to updates by using a database timestamp or flag.
However, I want to handle optimistic concurrency for INSERTS
To illustrate here is a fake scenario:
Multiple users can insert a journal entry at the same time, but allow only one journal entry is allowed per date.
Without any concurrency control since multiple users can create journal entries, I can end up with multiple journal entries on the same date.
How do I prevent this from happening at the application layer WITHOUT the use of the database (i.e. a database unique key constraint)