Re: audit log on normalized data



> 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

.



Relevant Pages

  • Re: Dataset from XML file
    ... put together in a file called Tag. ... I create a strongly typed dataset. ... Tablename = Appr ... ColumnName = form_Id ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Dataset from XML file
    ... I am taking an xml file that is given to my by a client that is created by ... and tell which form a tag is with. ... Tablename = Appr ... ColumnName = form_Id ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Dataset from XML file
    ... and tell which form a tag is with. ... Tablename = Appr ... ColumnName = form_Id ... Row: 0: 0 order false 0 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Dataset from XML file
    ... and tell which form a tag is with. ... Tablename = Appr ... ColumnName = form_Id ... Row: 0: 0 order false 0 ...
    (microsoft.public.dotnet.languages.vb)
  • RE: Dataset from XML file
    ... and tell which form a tag is with. ... Tablename = Appr ... ColumnName = form_Id ... Row: 0: 0 order false 0 ...
    (microsoft.public.dotnet.framework.aspnet)