I was wondering if there are general guides or standards which can be followed when trying to show if your own database implementation is ACID or BASE compliant?

For example are there any specific tests I can run?

  • By reading the documentation or doing a Google search. For example, Googling "Is MongoDB Acid" yields "MongoDB is not ACID compliant." – Robert Harvey Aug 10 '16 at 15:09
  • 1
    @RobertHarvey I should specify that I am building my own DB from the ground up so the question is more along the lines of how you can test if your own database implementation is or isn't ACID or BASE compliant. – Filipe Teixeira Aug 10 '16 at 15:11
  • 3
    Perhaps have a look at the SQLite source? The testing code for SQLite is 10x the size of the actual SQLite code. There's almost certainly some ACID tests in there somewhere. – Robert Harvey Aug 10 '16 at 15:14
  • 1
    Of course, if there are such tests, they demand to be named LITMUS. – Jules Jan 13 '18 at 15:34

The design of an ACID database is significantly different from that of a BASE database. ACID gives you assurances that a transaction will be complete. Distributing an ACID database adds significant complexity. BASE and other non-ACID databases are simpler to build and test.

Concepts to test (choose according to ACID / BASE design):

  • Is is possible to see part of a transaction change? (Depends on isolation level.)
  • Do changes appear in order?
  • Is the database view consistent with the effective isolation level? (Effective isolation level may not be the requested level.)
  • Do committed transaction survive a restart?
  • Do committed transactions survive a database crash?
  • Can a transaction be rolled back?
  • Is the appropriate data returned after a rollback?
  • Do uncommitted transactions survive a database crash or restart? (Fail case)
  • Can a record with an uncommitted change be updated by anoouther transaction?
  • Are conflicting changes handled appropriately?
  • Are results appropriate is changes have not converged?
  • What happens if one instance of a distributed database instance shuts down (crash or requested)?
  • What happens when a distributed database instance rejoins the cluster?
  • What happens if a distributed database instance never rejoins the cluster?

Your expectations are for these concepts will drive the type of database you build.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.