0

I would like to log new products, updates to products and deletions of products (and the same for other schemata [customers, locations etc]).

Would it be best to have a separate table (e.g. ProductLog, CustomerLog) for this, so that I can have a product foreign key as a field in the ProductLog, customer foreign key in the Customer Log etc?

Or should I use one table to avoid creating essentially double the amount of tables?

1

2 Answers 2

0

When using MSSQL you can use temporal tables to track versions of your record.

See https://learn.microsoft.com/en-us/sql/relational-databases/tables/temporal-tables

0

Yes I would use separate tables.

I worked in a company where we were doing the same for the exact same reason.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.