Click here to Skip to main content
15,890,690 members
Home / Discussions / Database
   

Database

 
GeneralRe: insert_update Stored procedure and return Identity value Pin
wajans7-Nov-08 2:55
wajans7-Nov-08 2:55 
QuestionAtomic Sql Statements (Transaction) Pin
Meysam Mahfouzi5-Nov-08 4:41
Meysam Mahfouzi5-Nov-08 4:41 
AnswerRe: Atomic Sql Statements (Transaction) Pin
J4amieC5-Nov-08 4:46
J4amieC5-Nov-08 4:46 
GeneralRe: Atomic Sql Statements (Transaction) Pin
Meysam Mahfouzi5-Nov-08 4:50
Meysam Mahfouzi5-Nov-08 4:50 
AnswerRe: Atomic Sql Statements (Transaction) Pin
Meysam Mahfouzi5-Nov-08 4:48
Meysam Mahfouzi5-Nov-08 4:48 
AnswerRe: Atomic Sql Statements (Transaction) Pin
Wendelius5-Nov-08 8:04
mentorWendelius5-Nov-08 8:04 
GeneralRe: Atomic Sql Statements (Transaction) Pin
PIEBALDconsult5-Nov-08 13:33
mvePIEBALDconsult5-Nov-08 13:33 
GeneralRe: Atomic Sql Statements (Transaction) Pin
Wendelius6-Nov-08 7:39
mentorWendelius6-Nov-08 7:39 
I think there are several factors that affect the choice how transactions should be used.

In my example I used two separate procedures that are executed in a sequence. If the execution as a whole should have ACID properties, the must be wrapped inside a common transaction. Basically this gives two options:
1. create a new stored procedure combining both calls thus leading to single call to backend
2. use transaction with a scope over two different SQL calls

In point 1, transaction problem is solved (in a simple case) but also the backend now knows (at least partly) the business logic (order of operations and the sequence). This may or may not be acceptable. The problem becomes more difficult if the procedures are not located in the same backend

In point 2, we would need a higher level transaction manager (such as classes in System.Transactions namespace or even self made mechanism). This adds extra 'overhead' to the programming but also it's possible to have more resources inside the same transactions. If this is needed, is again depending on the requirements of the system.

One good link that came in mind: http://blogs.msdn.com/diegumzone/archive/2006/08/14/699219.aspx[^]

The need to optimize rises from a bad design.

My articles[^]

GeneralRe: Atomic Sql Statements (Transaction) Pin
PIEBALDconsult6-Nov-08 11:27
mvePIEBALDconsult6-Nov-08 11:27 
GeneralRe: Atomic Sql Statements (Transaction) Pin
Wendelius7-Nov-08 6:36
mentorWendelius7-Nov-08 6:36 
Questionsql server 2005 query xml datatype fields Pin
arkiboys5-Nov-08 2:55
arkiboys5-Nov-08 2:55 
AnswerRe: sql server 2005 query xml datatype fields Pin
Wendelius5-Nov-08 10:33
mentorWendelius5-Nov-08 10:33 
GeneralRe: sql server 2005 query xml datatype fields Pin
arkiboys5-Nov-08 10:54
arkiboys5-Nov-08 10:54 
GeneralRe: sql server 2005 query xml datatype fields Pin
Wendelius5-Nov-08 11:13
mentorWendelius5-Nov-08 11:13 
GeneralRe: sql server 2005 query xml datatype fields Pin
arkiboys6-Nov-08 1:50
arkiboys6-Nov-08 1:50 
GeneralRe: sql server 2005 query xml datatype fields Pin
Wendelius6-Nov-08 7:06
mentorWendelius6-Nov-08 7:06 
Questiontransfering data fro one table to another Pin
prasadbuddhika5-Nov-08 1:07
prasadbuddhika5-Nov-08 1:07 
AnswerRe: transfering data fro one table to another Pin
Ashfield5-Nov-08 1:34
Ashfield5-Nov-08 1:34 
GeneralRe: transfering data fro one table to another Pin
prasadbuddhika5-Nov-08 16:08
prasadbuddhika5-Nov-08 16:08 
GeneralRe: transfering data fro one table to another Pin
Ashfield5-Nov-08 21:01
Ashfield5-Nov-08 21:01 
GeneralRe: transfering data fro one table to another Pin
Muditha Dissanayake6-Nov-08 4:39
Muditha Dissanayake6-Nov-08 4:39 
Questionwhere can i find the northwind sql script Pin
prasadbuddhika4-Nov-08 23:58
prasadbuddhika4-Nov-08 23:58 
AnswerRe: where can i find the northwind sql script Pin
cyber-drugs5-Nov-08 0:12
cyber-drugs5-Nov-08 0:12 
GeneralRe: where can i find the northwind sql script Pin
prasadbuddhika5-Nov-08 0:34
prasadbuddhika5-Nov-08 0:34 
GeneralRe: where can i find the northwind sql script Pin
cyber-drugs5-Nov-08 0:41
cyber-drugs5-Nov-08 0:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.