Describe the difference between optimistic and pessimistic locking.
"While these are both record locking technologies, their function differs dramatically. I pessimistic locking, when are user updates a record it is then locked. The record can only be updated again after the record is unlocked. Conversely, using optimistic locking, a record can be updated by one user and then other users can update it. The only time the record is locked is when a user is actively updating it. Optimistic locking is applied to applications where users are allowed to collaborate with each other."
In this technical question, the interviewer is asking you to define the difference between two similar terms. Only the most experienced ICT qualified administrators will be able to address this. A good way to answer this question is to define each term, then provide an example of how the technology is applied.
"Pessimistic locking describes a process where a record is locked after the data is updated. This prevents anyone else from accessing the record. The lock can be released, and the record can then be updated. Optimistic locking, on the other hand, allows multiple users to open the same record and update it. The only time the record is locked is when someone is actively updating it. This is typically used for web applications in which collaboration is occurring."
