0
We have several tables that some users will have permissions for changes. I need to have a table of changes made by the user. Let me give you an example. Let’s assume a products table, this product will be in various establishments with different prices that generates me a products-establishment table right? Now comes my doubt, the user will change the price and I need to store the previous prices, who changed and what was this establishment. It is correct to create a table change and create a relationship with products-establishment?
I get it, just create a log with all the information I need. Just one more question, Only with Trigger and Log can you do this? I like having two options every time. It’s good to have a plan B. kkkkk
– Stênio Barroso de Moraes
I believe that the best solution is to do it this way, but you can do it another way yes, you can create a table with the price history of each product. You would have to put all the important information in this table. Ex: COD_PRODUTO, PRECO, DATA_INICIO, DATA_FIM, COD_USUARIO (with the user who changed the information).
– user167899