Pessimistic and Optimistic Locking - System Design Simplified