- Design your data access layer based on how the data is used.
- Cache data to avoid unnecessary work.
- Connect by using service accounts.
- Acquire late, release early.
- Close disposable resources.
- Reduce round trips.
- Return only the data you need.
- Use Windows authentication.
- Choose the appropriate transaction type.
- Use stored procedures.
- Prioritize performance, maintainability, and productivity when you choose how to pass data across layers.
- Consider how to handle exceptions.
- Use appropriate normalization.
Reference: http://msdn.microsoft.com/en-us/library/ms998569.aspx
Some good points, although I would say "Use stored procedures when applicable". For a lot of data access scenarios such as a lot of simple CRUD stuff, there is no benefit to using stored procedures.
ReplyDelete@Craig: In my opinion, CRUD stored procedure is good idea. There is no harm to use it. Individual queries are not good for Server and consume server resources.
ReplyDeleteYou can read Paul Nielsen's, a database expert, post about stored procedures.
ReplyDeletehttp://sqlblog.com/blogs/paul_nielsen/archive/2009/05/09/why-use-stored-procedures.aspx
Now, you can follow Programming360 updates on twitter Programming360
ReplyDelete