Due to the inherent challenges in testing stored procs, they can be the cause of some really nasty bugs. Bug Prone: Since stored procedures encapsulate application logic, it should be moved into the application code, where it can be better managed and tested.Drawbacks of Stored Proceduresĭespite their long-established advantages, opponents of Stored Procedures point out their many disadvantages, such as: Sounds like a useful tool so far, but, as we'll see in the next section, not everyone is convinced. This loose coupling is advantageous because it's easy to reappropriate a proc for a different but similar purpose. Stored procedures can access or modify data in a database, but it is not tied to a specific database or object. Stored Procedure BasicsĪs expressed in the Understanding Stored Procedures and Functions in Relational Databases:Ī stored procedure - or "proc" for short - is a set of Structured Query Language (SQL) statements with an assigned name, which are stored in a relational database management system as a group, so it can be reused and shared by multiple programs. Over the next couple of blog articles, we'll explore their reasons for doing so, and whether this paradigm shift points to the eventual obsolescence of Stored Procedures. The preferred approach of these businesses for accessing their database(s) is to employ an Object-relational Mapper (ORM) such as NHibernate or Entity Framework. Stored procedures have been falling out of favour with some organizations for several years now. Are Stored Procedures an Outdated Tool? by Robert Gravelle
0 Comments
Leave a Reply. |