Employee Data and saving changes

Hi, 

I am creating an employee application. I have an employee CDT. One of the requirements is to save employee data changes and have a history of the changes. 

An idea to do this is to save a new employee in the CDT each time a change is made. I don't think this is a good idea, could you list out all the reasons why this is not a good idea? 

A suggested solution would be ideal too. I'm thinking a separate audit CDT is best to save the changes and who made the changes. 

Many thanks, 

Eric

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    Hi Eric,

    My suggestion would be to have a main Employee CDT, as you suggest, as well as an Audit CDT. Any update to the employee should overwrite the Employee CDT, so that querying the Employee table will return the most up-to-date employee. You can also save any change to the employee to the Audit table (and have a foreign key to the employee), so that you can query the Audit table for a single employee (foreign key), and return a history of all action taken on that employee.

    Hope this helps.
Reply
  • 0
    Certified Lead Developer
    Hi Eric,

    My suggestion would be to have a main Employee CDT, as you suggest, as well as an Audit CDT. Any update to the employee should overwrite the Employee CDT, so that querying the Employee table will return the most up-to-date employee. You can also save any change to the employee to the Audit table (and have a foreign key to the employee), so that you can query the Audit table for a single employee (foreign key), and return a history of all action taken on that employee.

    Hope this helps.
Children
No Data