Re: Referential integrity
Posted in 1998
Philippe Fornaciari wrote: > > Hi all, > > I am using Power designor to build the conceptual and physical model of > my project. To build my database (Informix OLWS 7.22 ) from my physical > model, there are two ways to generate referential integrity in the > database : > > * Using triggers and stored procedures > or > * Generate declarative statements in a SQL script > > What is the best method for performance ? > > Best regards. > > Philippe Fornaciari > Summit Technologies International > p.fornaciari@summittechnologies.com Declarative wins every time. The database engine can analyze and optimize if it knows about the referential integrity. It's also a lot easier to write. Some tools probably give you the choice to allow for brain-dead old databases which implemented triggers before declarative. I seem to remember that the main culprit here also had trouble with another simple database engine design choice: row-level locking. -- 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.org.uk/