aspose file tools*
The moose likes JDBC and the fly likes Agile Database - Java JDBC concerns Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Agile Database - Java JDBC concerns" Watch "Agile Database - Java JDBC concerns" New topic
Author

Agile Database - Java JDBC concerns

Joseph Yin
Greenhorn

Joined: Oct 05, 2003
Posts: 3
When using Java to access database tables, one of the biggest concern is the transaction control (commit or rollback). Does anyone have any guideline or solution to address my concern.
Thanks, Joseph Yin
jyin@qualcomm.com
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Interesting. Do you have any specific concerns regarding how an agile database design would affect your transaction management?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Commit if you want the changes to be persistent, rollback otherwise, so it seems to me. But I guess I don't understand the question...?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Surasak Leenapongpanit
Ranch Hand

Joined: May 10, 2002
Posts: 341
By default in JDBC transaction starts and commits after each statement's execution on a connection. But it gives poor performance when multiple statements on a connection are to be executed.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by surasak lee:
By default in JDBC transaction starts and commits after each statement's execution on a connection. But it gives poor performance when multiple statements on a connection are to be executed.
But this still doesn't have anything to do with agile database design...
Serge Adzinets
Ranch Hand

Joined: Nov 26, 2002
Posts: 166
This topic seems appropriate for JDBC forum.


Best Regards,<br />Serge
Craig Demyanovich
Ranch Hand

Joined: Sep 25, 2000
Posts: 173
Given a java.sql.Connection instance conn, use

Now you can commit only when you want to.
Craig
[ January 14, 2004: Message edited by: Craig Demyanovich ]
[ January 14, 2004: Message edited by: Craig Demyanovich ]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

What is agile database? This is a new term .


Groovy
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
I'm moving this to the JDBC forum.


"I'm not back." - Bill Harding, Twister
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
What is agile database? This is a new term .
There is no such a thing. There's agile database design or development, however.
[ January 14, 2004: Message edited by: Lasse Koskela ]
Scott Ambler
author
Ranch Hand

Joined: Dec 12, 2003
Posts: 608
For Agile Database material, check out www.agiledata.org.
When it comes to transaction control and agile databases, my only advice is to understand transaction control, concurrency control, recognize you have options, and the pick the right approaches. http://www.agiledata.org/essays/concurrencyControl.html might help a bit.
- Scott


<a href="http://www-306.ibm.com/software/rational/bios/ambler.html" target="_blank" rel="nofollow">Scott W. Ambler</a><br />Practice Leader Agile Development, IBM Rational<br /> <br />Now available: <a href="http://www.ambysoft.com/books/refactoringDatabases.html" target="_blank" rel="nofollow">Refactoring Databases: Evolutionary Database Design</a>
 
jQuery in Action, 2nd edition
 
subject: Agile Database - Java JDBC concerns