create table and add some triggers