Todd Benson wrote:

> I'm going to slightly disagree with Lionel -- and also Robert -- on
> this one.  First of all, a database is not necessarily just for
> concurrency.  It's for data integrity

Yes I agree (as explained below concurrency is what I consider the main 
problem to solve to enforce data integrity). That said if you write your 
data in one pass as the OP, you don't need data integrity in the storage 
layer... rename is atomic : you either renamed the temp file to its 
final position before a crash or not.

The problem are partial updates where you need to maintain consistancy. 
And on the top of my head the only problems with partial updates are :
- concurrent accesses (most common, counting both concurrent read and 
write accesses),
- crashes (fortunately less common and can even be adressed by backups 
in many cases).

These are why I disagree with people wanting to push all the consistency 
logic into the applicaltion layer on database-backed applications with 
concurrent access (like often advocated for Rails). It's simply not 
doable without recoding the whole concurrent access manager  and 
log-based/MVCC/... crash resistance of the database in the application 
layer (good luck with that).

Lionel.