audit trail, take 2

David Merrill dmerrill@lupercalia.net
Thu, 4 Jan 2001 09:40:37 -0500


On Wed, Jan 03, 2001 at 11:02:35PM -0800, Dave Peticolas wrote:
> David Merrill writes:
> > On Wed, Jan 03, 2001 at 05:02:15PM -0800, Dave Peticolas wrote:
> > > David Merrill writes:
> > > 
> > > > The major changes are:
> > > > 
> > > > - a single table; no separate audit table.
> > > > - the client doesn't work directly with guids, but instead works with
> > > >   an "ID" field that does not change when records are edited. The guid
> > > >   stays globally unique. The client still has access to the guid, if it
> > > >   wants it.
> > > > 
> > > > Did I miss anything? There are so many threads going I could have very
> > > > easily done that. But that's not a complaint; I'm very glad to see so
> > > > many folks interested in this.
> > > 
> > > I'm not clear as to the difference between and purpose of
> > > the xaction_guid and xaction_id fields.
> > 
> > The guid is specific to a record in the database. The id represents a
> > transaction, but not any particular version of the transaction. If a
> > transaction is changed, the guid for the new version is a new guid,
> > but the same id remains.
> > 
> > The guid is there for those portions of the system that care about the
> > specific record, as opposed to the more general transaction which can
> > change and still be the same transaction. The id is there for other
> > parts of the system that don't care, and only want the current
> > version.
> 
> Is the xaction_id also a guid, in the sense of being globally unique?
> 
> What I'm really getting at is, for a given transaction, will there be
> some 'stable' GUID with which you can quickly access the most recent
> version? By stable I mean that you can always use that same GUID to
> get the most recent version.

The xaction_id is not globally unique. If a record is edited 9 times,
there will be 10 records with the same id. Once for the record
originally created, and once for each edit.

The guid is globally unique. Each of these records would have different
guids.

-- 
Dr. David C. Merrill                     http://www.lupercalia.net
Linux Documentation Project                dmerrill@lupercalia.net
Collection Editor & Coordinator            http://www.linuxdoc.org
                                       Finger me for my public key

I circle around, I circle around
The boundaries of the earth.
Wearing my long wing feathers as I fly.
		-- Native American Ghost Dance