Subject | Re: [firebird-support] Read uncommitted |
---|---|
Author | Gustavo |
Post date | 2010-08-17T02:33:29Z |
Thank you for your answer Marco.
The way number 2 is not good for me because usually a seller may take 30
minutes or more making an order (with the customer in front of him) and he
has to be sure that he has stock at the moment he selects each product, not
when he emits the order.
The way number 1 I think is what I suggest in my firs mail, but for this to
work I have to commit each line of the order (in the table of orders or in
an auxiliary table) so the other sellers can "see" it. But what happens if
the computer suddenly shuts down after commiting some lines of the order but
before ending the order. You said "your application must has a way to
rollback or commit the sell when it crashes and return back up" and I agree
but how can I do thing to prevent a case like this?
The way number 2 is not good for me because usually a seller may take 30
minutes or more making an order (with the customer in front of him) and he
has to be sure that he has stock at the moment he selects each product, not
when he emits the order.
The way number 1 I think is what I suggest in my firs mail, but for this to
work I have to commit each line of the order (in the table of orders or in
an auxiliary table) so the other sellers can "see" it. But what happens if
the computer suddenly shuts down after commiting some lines of the order but
before ending the order. You said "your application must has a way to
rollback or commit the sell when it crashes and return back up" and I agree
but how can I do thing to prevent a case like this?
----- Original Message -----
From: "Marco Antonio Abreu" <mabreu.ti@...>
To: <firebird-support@yahoogroups.com>
Sent: Monday, August 16, 2010 11:06 PM
Subject: Re: [firebird-support] Read uncommitted
> Hello Gustavo.
>
> The solution is not on the database but in your application. It has to do
> the sell in two steps and you have two ways to do this.
>
> 1 - the application allocates immediatelly the part of the stok to the
> first
> seller (70) and when the second looks there will be only 30 to sell.
>
> 2 - the application permit each seller to use all the stok (70 + 50), and
> at
> the end it confirms the qualtity the real can sell.
>
> For both solutions, your application must has a way to rollback or commit
> the sell when it crashes and return back up. The important is that the
> solution is not on the database but in the application.
>
> []'s,
>
> --
> Marco Antonio Abreu
> mabreu.ti@...
> System Analist/Developer/DBA
>
>
> 2010/8/16 eMeL <emel@...>
>
>>
>>
>>
>> > Is there any way of reading uncommitted data of another transactions?
>>
>> Sorry, my answer before not for this problem.
>>
>> eMeL
>>
>>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>