Good day! There is a standard CRUD application implemented using WinForms. I would like to keep a history of actions, that is, when a row in a table was changed or when it was deleted / added. Hence the question, how best to implement this functionality?
- Do you want to log changes to the database in the tables of this database, or in the log file (this is not the same thing!)? - lospejos
- @lospejos, it makes no difference to me, and you can log into the log with the help of triggers. But now I'm leaning towards the triggers. I wrote: "I would like to lead a story." Perhaps I have not quite correctly assigned the name of the topic ... - Tibomso
- 2If I created an application, and I had the opportunity for resources, I would log in each of the elements of the system: logging of logic (the so-called Business Logic Layer), I would do in log files on application servers, and data changes (Database Layer ) - in special tables in the database. Because you never know what may be needed in the analysis of flights. - lospejos
- @lospejos, just if I have a table in the database with user actions, then I can easily output the data to any other file. - Tibomso
|
1 answer
Look towards the triggers. You can write them to each table that you want to track and write into them the functionality that will take notes, for example, in another table. At the database level, this is the best option, as I believe.
Perhaps this option will suit you more than creating a log file.
- oneYour advice helped me a lot, thanks! - Tibomso
|