Subject | Re: generate report for POS |
---|---|
Author | Adam |
Post date | 2006-07-01T02:58:43Z |
--- In firebird-support@yahoogroups.com, bill_lam <bill_lam@...> wrote:
It is just the methodology Firebird uses to manage concurrent
transactions. Other databases use locking, firebird uses MGA.
What you can do is elect how you want the transaction to behave which
is either SNAPSHOT or READ COMMITTED. You can also elect whether you
want to WAIT or NO WAIT in the event of a conflict (eg, two concurrent
transactions attempting to update the same record).
For your report, simply start a snapshot transaction (not sure how
this is done in your environment, but if you post details someone will
know). Then just issue your select statement, and it will not see
changes made subsequent to the transaction start. There are lots of
options depending on what you are doing, and many scenarios that can
be encountered, too many for a single post.
If you are new to Firebird and plan on using it, you should buy a copy
of 'The Firebird Book' by Helen Borrie (Apress). It will pay for
itself very quickly once you start reading with the time you save
using best practices from the start, rather than having to fix a poor
design choice later.
Adam
>any real
> Adam wrote:
> > Multi-generational architecture.
> > (Some other databases have called the same thing MVCC)
>
> Thank you for references. I heard versioning before but did not find
> programming example.eg. calling
>
> Is there any pointer to show how to use this feature in programming,
> from odbc?You can't not use it ;)
It is just the methodology Firebird uses to manage concurrent
transactions. Other databases use locking, firebird uses MGA.
What you can do is elect how you want the transaction to behave which
is either SNAPSHOT or READ COMMITTED. You can also elect whether you
want to WAIT or NO WAIT in the event of a conflict (eg, two concurrent
transactions attempting to update the same record).
For your report, simply start a snapshot transaction (not sure how
this is done in your environment, but if you post details someone will
know). Then just issue your select statement, and it will not see
changes made subsequent to the transaction start. There are lots of
options depending on what you are doing, and many scenarios that can
be encountered, too many for a single post.
If you are new to Firebird and plan on using it, you should buy a copy
of 'The Firebird Book' by Helen Borrie (Apress). It will pay for
itself very quickly once you start reading with the time you save
using best practices from the start, rather than having to fix a poor
design choice later.
Adam