[SQL] Database consistency after a power shortage

2010-12-15 Thread Alberto
My question is regarding a potential situation: I have a program that inserts values on 3 tables linked to each other. My program is used in a POS. In this specific case, the program has to update the tables "header_invoice", "detail_invoice" and "payments_x_header_invoice". In a normal operation

Re: [SQL] Database consistency after a power shortage

2010-12-15 Thread Scott Marlowe
On Wed, Dec 15, 2010 at 8:12 AM, Alberto wrote: > My question is regarding a potential situation: > > I have a program that inserts values on 3 tables linked to each other. My > program is used in a POS. In this specific case, the program has to update > the tables "header_invoice", "detail_invoic

Re: [SQL] Database consistency after a power shortage

2010-12-15 Thread Samuel Gendler
On Wed, Dec 15, 2010 at 11:38 PM, Scott Marlowe wrote: > On Wed, Dec 15, 2010 at 8:12 AM, Alberto wrote: > > > > > Is there any way to make the 3 operations be one transaction for the > > database, so that it keeps them all consistent in case a power shortage > > occurs in the middle? > > Yes, pu

Re: [SQL] Database consistency after a power shortage

2010-12-16 Thread Jean-David Beyer
Samuel Gendler wrote: > > > On Wed, Dec 15, 2010 at 11:38 PM, Scott Marlowe > wrote: > > On Wed, Dec 15, 2010 at 8:12 AM, Alberto > wrote: > > > > > Is there any way to make the 3 operations be one transaction for the