Re: Database Triggers
Posted in 1998
John Bedford wrote: > > Hi, > > I'm currently doing a project on Active Database Systems and I am > interested to know if anyone > actually implements triggers within their database systems and what > they find them most useful for?. I'm also interested to know of any > problems encountered with using triggers. > > Any feedback would be very grateful, > > Thanks, > > - john I use a few triggers for maintaining some tables that should really be views. They are used as the references of foreign keys. SQL-92 allows views to be the references of foreign keys but Informix does not, hence the need for the triggers. My philospohy with triggers (and stored procedures) is to use them for maintaining the database integrity or providing general-purpose functions. I don't split applications into a pile of stored spaghetti and a covering of application sauce. I have never had any problems with triggers other than one of my own making. A bug in table locking with stored procedures caused a problem but a version change fixes this. -- Peter Lancashire Information Systems Specialist, Bayer plc Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK Tel: +44-1635-562258, Fax: +44-1635-562281 Mail: Peter.Lancashire.PL1@bayer.co.uk --- My Internet plumbing does not allow me to mail and post news together. Sorry. All opinions are my own and not those of Bayer plc. --- Join Infuse, the UK Informix User Group at http://www.infuse.co.uk/