Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Sequence isolation - why does it matter?
Old 11-29-2007, 07:06 PM Sequence isolation - why does it matter?
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
A client wants us to create functionality in SQL Server to mimic something Oracle is better at.

When you execute SQL code inside a transaction with serializable as the isolation level, that means you would get the same, predictable results. Even though the database is multithreaded, serializable transactions act like there is only one CPU that completes one transaction before starting the next. There are no phantoms and there are no non repeatable reads.

But Oracle takes this a step further. What they say is logically true, but I can't see how it matters? When you use an identity column (Access calls these "AutoNumber") that generates sequential numbers, this sequence isn't protected from other transactions in SQL Server or MS Access, but it is in Oracle. If you insert a row in a transaction that gets rolled back, whatever ID value it gets becomes a black hole. If it would be #3, then row #3 is destroyed, and you might have #1, #2, and #4, but never a #3. This can lead to "data islands" and they want to avoid that.

Now this is a client that pays their bills on time, so apparently we don't ask questions why they want something. It won't be that difficult to build, there will be a tracking table of ID sequence values and their status, and some stored procedures to manage that, to generate a new value, and so on. And then they'll be able to generate sequence numbers in a serial seeming way that will be isolated from other transactions without breaking uniqueness in table values.

But why on earth is that desirable?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Sequence isolation - why does it matter?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.08329 seconds with 12 queries