Two Laptop Bag
The moose likes JDBC and Relational Databases and the fly likes How to test ACID rules in DB using JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "How to test ACID rules in DB using JDBC" Watch "How to test ACID rules in DB using JDBC" New topic
Author

How to test ACID rules in DB using JDBC

Amirtharaj Chinnaraj
Ranch Hand

Joined: Sep 28, 2006
Posts: 239
Hi,

I heard about the ACID (Atomicity, Consistency, Isolation, Durability) rules. i want to test weather my DB is passing these test using JDBC. How can i test this requirement? I searched some sample code in the Google , but not able to find.

thanks
Amir
harshvardhan ojha
Ranch Hand

Joined: Jul 26, 2007
Posts: 157
    
    1

Hi Amir,
i believe ACID is the property of RDBMS not JDBC. And jdbc is just a way to connect to DB, as far as i know, JDBC can give you some guarantees over connections only but not ACID properties.
Amirtharaj Chinnaraj
Ranch Hand

Joined: Sep 28, 2006
Posts: 239
Hi

JDBC can give the connection, With the connection you are doing the transaction. All the transaction should Obey the ACID rule. I am having some strategy to test this ACID rule using Java threads. But i am waiting for some gurus to respond.

Jayesh A Lalwani
Saloon Keeper

Joined: Jan 17, 2008
Posts: 2591
    
  29

Is there a specific scenario that you want to test? or yu want to prove to yourself that the database is ACID compliant? I would just test it "by hand". And by hand I mean bring up 2 instance of a SQL client that connect to the same schema, and test by scenario. Each instance of the SQL client shold have it;s own connection and transaction. I wouldn't do it in Java.
Amirtharaj Chinnaraj
Ranch Hand

Joined: Sep 28, 2006
Posts: 239
Lalwani,


I just want to test for myself, However i would like to test using java code (JDBC). if you have any steps.can you please share it with me or else if you have any strategy please give me some more details. i will bw much thankful

thanks
Amir
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to test ACID rules in DB using JDBC