Update database persistence to handle concurrency and repeatable-read