开发者

SQL Server\ORACLE thread safety

I am new to data base programming. I am trying to understand how oracle and sql 开发者_运维技巧server manage concurrency.

  1. Lets say two threads are running. one is updating the row and the other deleting it.

1.1. what does oracle ensure in that case ? could it be that thread2 runs while thread 1 completed only half of the update ?

1.2 what does access ensure in that case ? could it be that thread2 runs while thread 1 completed only half of the update ?


Oracle and Sql Server are enterprise-class servers that guarantee ACIDic transactions. There is no "half update" possible.

For your examples, it is first-in wins: So if a thread deletes a row and then another tries to update it, this will result in an error. If a thread edit's a row and then another deletes it then it will be deleted.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜