acid

How do distributed transactions work (eg. MSDTC)?

I understand, in a fuzzy sort of way, how regular ACID transactions work. You perform some work on a database in such a way that the work is not confirmed until some kind of commit flag is set. The commit part is based on some underlying assumption (like a single disk block write is atomic). In the event of a catastrophic error, you c...

Transaction encapsulation of multi-process writes

I have a database scenario (i'm using Oracle) in which several processes make inserts into a table and a single process selects from it. The table is basically used as a intermediate storage, to which multiple processes (in the following called the Writers) write log events, and from which a single processes (in the following referred t...

in sqlite3, can a select succeed within a transaction of insert?

I begin a transaction, which is to insert several records into a table. Can I select the latest inserted record out of the database before the transaction commit? ...

Implementing ACID

I am starting research on a project that will need to provide ACID semantics on its database. Due to the nature of the data it is not suitable for storage in common off-the-shelf systems (relational or key-value). What are some good resources on how to implement systems which must provide ACID semantics? My typical Google search ret...

Renaming DB column in referencing table (violation?)

Say I have this table: Person table -------------- PersonId Address table ------------ AddressId PersonAddressId where PersonAddressId is PersonId and the foreign key. Is there any type of database violation in renaming the foreign key? It can become very confusing to work with when they have different names. ...

Patterns for implementing transactions outside of a database

I have to send an email, write to a file, and call a web service. To maintain consistency, all steps must happen. If any step throws an exception or errors out, all steps must be rolled back. Before I go rolling my own object ACID engine, are there any commonly accepted patterns for implementing ACID semantics at the object level? Bett...

What's a real-world example of ACID?

I'm looking for a real-world example for the various ACID properties of a database. ...

Rollback for Atomic and Durability

Hi, I am trying to understand the ACID property of database transction: how they are achieved; which part is atomicity and which part is durability ,etc. Let's say I have a transction with two actions,A and B. Unfortunately, system powered off when performing action B. After a system reset, we know the database will preserve (through t...

Are disk sector writes atomic?

Clarified Question: When the OS sends the command to write a sector to disk is it atomic? i.e. Write of new data succeeds fully or old data is left intact should the power fail immediately following the write command. I don't care about what happens in multiple sector writes - torn pages are acceptable. Old Question: Say you have old ...

Multiple WCF service calls in ACID transaction

Here's my scenario: I need to make three or four calls to different WCF services before completing the transaction - what are my options, if any? ServiceA.SaveWork(work1); ServiceB.SaveWork(work2); ServiceC.SaveWork(work3); ServiceD.SendNotification(notification); If one call fails, all fail... Note that these services may not be in t...

Transaction Isolation on select, insert, delete

What could possibly go wrong with the following transaction if executed by concurrent users in the default isolation level of READ COMMITTED? BEGIN TRANSACTION SELECT * FROM t WHERE pid = 10 and r between 40 and 60 -- ... this returns tid = 1, 3, 5 -- ... process returned data ... DELETE FROM t WHERE tid in (1, 3, 5) INSERT INTO t (tid...

Is there any NoSQL that is ACID compliant?

Is there any NoSQL that is ACID compliant? (Or is that even possible with NoSQL given it's just a bunch of loosely coupled key-value pairs.) ...

Are there generic implementations of ARIES or other ACID-ensuring algorithms?

I have an application which I'd like to carry out certain actions atomically. However, these actions are occurring on remote storage, and connections may drop, actions may fail, etc. There's plenty of literature on how to enforce ACID properties - write-ahead logging, ARIES, etc. - but are there any generic implementations of these avai...

IE9 Acid 3 test?

Does anybody know if Microsoft is planning on having IE9 pass with 100/100 on acid 3? The current version of IE9 gets a 68/100 on the test (can be viewed here, main site here). What did IE8 pass with? What about IE7? How does it compare to other modern browsers such as Safari, Firefox, and Chrome? Please submit useful answers, not opin...

Transactional NTFS (TxF) on Process.Start()

Consider the following code: try { using(TransactionScope) { Process.Start("SQLInstaller.EXE"); throw new Exception(); Commit(); } } catch(Exception ex) { //Do something here } Will the changes made by SQLInstaller.exe be rollback in this scenario? More specifically, will the changes made by an externa...

Which should take initiative task on rollback, App or DB?

MySql InnoDB is set autocommit off and used default isolation level REPEATABLE READ. There are two scenarioes that two distinct transactions T1 and T2 run in the time sequence below, 1) time T1 T2 t1 update row 1->OK t2 update row 2->OK t3 update row 2->wait->timeout error t4 commit or rollb...

Great articles/videos/... on non-ACID (distributed) systems? ("Eventually Consistent" etc.)

I'll start with these - IMO brilliant - articles: Base: An Acid Alternative - by Dan Pritchett (eBay), 2008 Eventually Consistent (- Revisited) - by Werner Vogels (Amazon), 2008 Brewer's conjecture and the feasibility of consistent, available, partition-tolerant web services (non-free) - by Seth Gilbert, Nancy Lnych (MIT), 2002 I'm i...

Is the data system for ATM-machines using eventual consistency?

I wounder how the world-wide ATM-systems are architected. It must be pretty hard for the banks to design a consistent system world wide. Do they use eventual consistency for this or do they use a great ACID system? I can be in Sweden one day, where my bank is and use the ATM, then take the airplane to USA or Thailand and use the ATM abr...

ACID and database transactions?

What is the relationship between ACID and database transaction? Does ACID give database transaction or is it the same thing? Could someone enlighten this topic. ...

Memory Mapped files and atomic writes of single blocks

If I read and write a single file using normal IO APIs, writes are guaranteed to be atomic on a per-block basis. That is, if my write only modifies a single block, the operating system guarantees that either the whole block is written, or nothing at all. How do I achieve the same effect on a memory mapped file? Memory mapped files are ...