MOD: database insert and update for plan table
MOD: default template