0

I'm working on a blog website with an Admin Panel. It consists of Articles, Categories, Tags, and Updates tables. The updates is a meta-data table which tracks any updates in any other table. What is the best way to link the updates to the others? How can I achieve normalization and avoid redundancy data? enter image description here

Go3shom
  • 9
  • 5
  • Almost by definition, you can't normalize this because the metadata duplicates the info held in "updated_at" in your other tables. – Neville Kuyt May 19 '21 at 09:32
  • So, what is the suitable way to make the metadata table to track all the processes, is it ok to remove ```updated_at``` column from all the other tables? – Go3shom May 19 '21 at 09:37
  • How do you want to use this information? Normally, you want to keep the attribute (updated_at) with the rest of the information. You could create a view, if you just want to be able to query "most recent changes". – Neville Kuyt May 19 '21 at 12:30
  • I want to save every single change _-before & after-_ with the updated table info [**updated_table_name**, **updated_column_name**, **update_itself**, & surely **updated_timestamps**] something like ```commits``` in ```Git``` or so -may be with hash code too-, but I don't know how to link the table ```updates``` to the other tables. – Go3shom May 20 '21 at 04:50
  • Is this answer useful? https://stackoverflow.com/questions/12563706/is-there-a-mysql-option-feature-to-track-history-of-changes-to-records/12564435#12564435 – Neville Kuyt May 20 '21 at 08:47

0 Answers0