1

Usually it convention not update records of mapping tables rather delete same and add new.

In that case it is not relevant to add updated_on column in mapping tables but still some one can update the table by mistake or intentionally which suggest to have updated_on column in all tables. It seems quite logical to add created_on column in all of tables, but confuesd little bit. Please suggest?

what is convention ?

Maddy.Shik
  • 6,609
  • 18
  • 69
  • 98
  • 1
    It depends. what do you intend to do with the information? – Mitch Wheat Apr 01 '11 at 03:12
  • I think it is useful to have such columns. However, If you intend to record update and create information, I think you should have something like a log talbe which will store information like: who update (username, or ip)? what time and date?. of course it is your choice – Nathanphan Apr 01 '11 at 09:38

1 Answers1

0

I think that you should not do this unless you plan to use the information. Otherwise you have to have triggers that will keep the data up to date, or you will simply forget and the row data will be meaningless. Such triggers will have different implications performance-wise (on PostgreSQL the impact should be pretty minimal, on some others perhaps less so).

In general there is little worse than filling your database with meaningless data (because it wasn't properly updated appropriately). You should avoid this to the extent possible.

Chris Travers
  • 25,424
  • 6
  • 65
  • 182