Re: Informix 4gl
Posted in 1994
mdl@world.std.com (Michael D Lemon) writes: >I'm interested in perspectives on using transactions with a data entry/ >inquiry screen, and more specifically with the detail sections. >What is the best granularity to use? Start and begin before and after >each row? Before and after the input array? Does anyone know what >the default is for NewEra and is it applicable to 4gl? I use a >generator which encloses the whole session in transaction. This >causes problems in certain applications. >This kind of development information seems to be hard to find. Thanks >for help or directions to the info. A transaction is defined as an atomic unit of work from the user's viewpoint. If the user sees a transaction as all the data entry operations for a master record and all its detail records, then that is what you should include in your delimited transaction bounds. Yes, this can cause problems for certain applications. You must design your applications to account for this. I developed a system where one application had a transaction that could last up to 8 hours in elapsed duration. Imagine the concurrency control required to manage a transaction that, not to mention managing the logical logs. But, I found a way. Very often, it's a training issue with the users. They will go to lunch in the middle of a transaction only once. The main thing you want to do is design your applications to keep transactions as short as possible. NewEra uses the ANSI standard that you are always in a transaction when processing against a logged database. A BEGIN WORK is issued the moment you bring up the application and each time you issue a COMMIT or ROLLBACK. But don't read something bad into this; it's a lot different coding event-driven applications than procedure-driven applications and a lot easier to manage the bounds of transactions. (However, end users will still go to lunch in the middle of a transaction only once.) - David