RE: Setting a Column Value on Insert
Posted in 1997
Hello! Bob Carts wrote 4) I would like to avoid forcing the application coders to do their insert via a stored procedure if possible. Any ideas? Sorry, IMHO, limiting the external interfaces of the database application to stored procedures only or at least mostly has some definite advantages (especially for OLTP applications): 1) It's very portable and works a similar way in different DBMS. 2) It allows the extreme control over data consistency. 3) It allows to hide the tables structure and even change them not affecting the applications (not always, surely). 4) It seriously simplifies the front-end coding 5) Making the tables inaccessible directly increases the security and protection against the incorrect operations (views aren't a comprehensive solution here). 6) In most DBMS, stored procedures work faster. 7) In some DBMS, triggers are less convenient then procedures, and require more coding and 'Clipboard instead of Procedures' programming technique. 8) Procedural code is far more readable and easy to maintain then complex queries expressed in declarative terms. Regards Igor I. Lisyansky