Subject Re: [firebird-support] user management and logging record changes
Author Alan.Davies@aldis-systems.co.uk
The first two items are explained well in the various Firebird docs.
The third item is quite easy to do via triggers and as much of your
original table as you need in a second (audit) table.
e.g.
real_table
id integer, detail, varchar (20), more_detail varchar(50)
audit_table
id, old_detail,old_more_detail,new_detail, new_more_detail (same field
types as real_table)

Create an update trigger on real_table something like:
insert into audit_table
id, old_detail,old_more_detail,new_detail, new_more_detail
values(old.id,old.detail,old.more_detail,new.new_detail,new.new_more_detail)

I'm sure you'll get other ways of achieving this.
Regards
--
Alan J Davies
Aldis

Quoting Nikolaus Kern <parzival1969@...>:

> Hello all,
>
> In a 2 tier environment I want to implement a user management.
>
> It should have following functions:
> *) Different users
> *) Different roles to access tables, views etc.
> *) Logging changes on record level: e.g. which user has created/updated
> the record when; What was the change exacctly
>
> I am quiet sure that this kind of functionality has been implemented
> several times already with Firebird.
>
> Can you please share your experience with me ?
>
> Thanks
>
> Niko
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>
>