사실, 문제는 다음과 같습니다. -
저는 테이블이 있는데, Payments라고합니다. 레코드를 검색하고보고 편집하기 위해 GUI를 거의 제공하지 않았습니다. 이제 사용자가
레코드를 편집하려고 시도하는 경우
일부 특정 작업을 수행합니다. 처리에는 1 분이 소요됩니다. 그런 다음 다른 사용자가 동일한 레코드에서 특정 작업을 수행 할 수 없어야합니다. 테이블에서 레코드를 잠그기위한 올바른/좋은 접근 방법은 무엇입니까?
Traditional approach of doing this is, have a column in the table, say _isLocked_. and whenever user is performing that action it should change the value of said column to, say, true. Once the process is completed it should reset the value of the column. Also, just before someone tries to perform the action, it should check the value of the column and notifies the user if the record is locked.