I am developing a web application with mysql, and I have several tables including user and article.
As I would like to record the user that has updated the selected article, I thought about three possibilities:
- Add two columns to the table article: ART_USE_ID (to know who has changed) and ART_date (to save the datetime).
- Create a third table changes with CHA_USE_ID, CHA_ART_ID and CHA_date, which would have an entry every time a user changes the table.
- Make a combination of both: create a table changes but keep a ART_date to retrieve more quickly the date of the last change.
In my opinion, the third one is redundant, and the first one badly conceptualised (and only the last change is kept). Even though the second one appears to be good for only one table (article), I am afraid it gets more complicated and very slow if changes must be saved for more than 30 tables -- that means the changes table would have 30 foreign key(?!)
What is the best way? What is your opinion about it?