Let's say the database have 5 tables for sake of simplicity (there're many more in reality). Table 1 has the basic information of a user which is not changed so often. However, the other tables are accessed very often. All these other tables have the user-id as the foreign key. I need to make a column
lastAccess in table 1 such that whenever the user works with any of the table, user's lastAccess in table 1 is updated.
It seems like a task which every person working with databases should know. I am new to working with RDBMS and exactly find a way to do it. A general direction, if a solution is not possible, will also be really appreciated.