Re: audit log on normalized data
- From: "frebe" <fredrik_bertilsson@xxxxxxxxxxx>
- Date: 23 Apr 2005 11:55:36 -0700
> So lets say the user sets the "Customer First Name" on an order. We
> want to record that the user has set the "Customer First Name" on
order > 23.
I uses two different approaches for this problem. One solution is to
have a table like this:
log(user, tablename, columnname, value)
Insert a record in this table every time you change a field that need
to be autited (this can be done using a trigger).
Another solution could be to change your order table to something like
this:
order(orderid, runningno, customer_first_name, ...., user)
In this scenario, order records could never be updateded, you can only
add records to this table. In addition you could create a view to show
the last (and valid) values of the order column.
select *
from order o1
where runningno = (select max(runningno)
from order o2
where o1.orderid =o2.orderid)
Fredrik Bertilsson
http://butler.sourceforge.net
.
- References:
- audit log on normalized data
- From: Secret Squirrel
- audit log on normalized data
- Prev by Date: Re: Objective criticism of inheritance
- Next by Date: Multi site - data collecting and processing machines
- Previous by thread: Re: audit log on normalized data
- Next by thread: agile methods compared?
- Index(es):
Relevant Pages
|