Oracle has a nice way of handling this but I don't know how universally applicable it is.
In Oracle, you can use FOR UPDATE on a SELECT statement to lock a record as you read it.
For example, if you are fetching a row for display:
select * into v_row from my_table where my_table_id = 1
for update;
This will allow reads but prevent updates. If another transaction has a lock your transaction will wait until it becomes available (or timeout, eventually). If you want the statement to throw an exception if you try to lock you add NOWAIT.
select * into v_row from my_table where my_table_id = 1
for update nowait;
If the row is already locked you will get:
ORA-00054: resource busy and acquire with NOWAIT specified.
Hope that helps.