The "reactive" method by default is that the second user waits for a lock to be released before the DML command can continue. Many people want a more "proactive" method. The solution to this is to open a cursor FOR UPDATE NOWAIT. This cursor will signify which row(s) of data you will be modifying and locks those rows. The NOWAIT clause tells the system you will not wait for other locks to be released. If another user currently has a lock, this cursor will throw an exception which you will want to handle in your code. The specific implementations all depend on your application development platform.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.