To help me understand the concepts of dirty-read, optimistic concurrency.
1. I would like some coding example on how to prevent problem with dirty-read.
2. Also, I would like some coding example for handling optimistic concurrency.

Thanks,
Saad..