惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

有赞技术团队
有赞技术团队
Security Archives - TechRepublic
Security Archives - TechRepublic
大猫的无限游戏
大猫的无限游戏
The GitHub Blog
The GitHub Blog
Google DeepMind News
Google DeepMind News
Vercel News
Vercel News
U
Unit 42
L
LangChain Blog
M
MIT News - Artificial intelligence
S
SegmentFault 最新的问题
月光博客
月光博客
MongoDB | Blog
MongoDB | Blog
Jina AI
Jina AI
博客园 - 聂微东
H
Hackread – Cybersecurity News, Data Breaches, AI and More
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Recent Announcements
Recent Announcements
Engineering at Meta
Engineering at Meta
Hacker News - Newest:
Hacker News - Newest: "LLM"
V2EX - 技术
V2EX - 技术
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
阮一峰的网络日志
阮一峰的网络日志
F
Fortinet All Blogs
D
DataBreaches.Net
Hacker News: Ask HN
Hacker News: Ask HN
W
WeLiveSecurity
N
News | PayPal Newsroom
量子位
Help Net Security
Help Net Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
S
Security @ Cisco Blogs
Y
Y Combinator Blog
H
Heimdal Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Stack Overflow Blog
Stack Overflow Blog
Attack and Defense Labs
Attack and Defense Labs
S
Secure Thoughts
P
Privacy International News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
SecWiki News
SecWiki News
Last Week in AI
Last Week in AI
AI
AI
Recorded Future
Recorded Future
C
Cyber Attacks, Cyber Crime and Cyber Security
Microsoft Security Blog
Microsoft Security Blog
P
Privacy & Cybersecurity Law Blog

博客园 - Jerry Qian

.net新技术书箱推荐 .net 操作excel的xml形式 wcf powershell type 一堂如何提高代码质量的培训课(转) powershell parse powershell basic powershell spirit .net国际化 转 MSBuild 简解 10-29 为什么linq以select开头 loadruuner 角本录制 test infopath 转log4net 配置 Service Broker 资料 sharepoint 安装 转 计算机端口介绍
怎样在存储过程及Sql语句之间选择
Jerry Qian · 2009-12-29 · via 博客园 - Jerry Qian

Consider the following guidelines when choosing between stored procedures and dynamic SQL:

1_1043131049
• If you have a small application that has a single client and few business rules, dynamic SQL is
often the best choice.
• If you have a larger application that has multiple clients, consider how you can achieve the
required abstraction. Decide where that abstraction should exist: at the database in the
form of stored procedures, or in the data layer of your application in the form of data access
patterns or O/RM products.
• If you want to minimize code changes when the database schema changes, consider using
stored procedures to provide an abstraction layer. Changes associated with normalization
or schema optimization will often have no affect on application code. If a schema change
does affect inputs and outputs in a procedure, application code is affected; however, the
changes are limited to clients of the stored procedure.
• Consider the resources you have for development of the application. If you do not have
resources that are intimately familiar with database programming, consider tools or
patterns that are more familiar to your development staff.
• Consider debugging support. Dynamic SQL is easier for application developers to debug.
• When considering dynamic SQL, you must understand the impact that changes to database
schemas will have on your application. As a result, you should implement an abstraction in
the data access layer to decouple business components from the generation of database
queries. Several patterns, such as Query Object and Repository, can be used to provide this
abstraction.
Application Architecture Guide 2.0a
Microsoft

martin flower

http://www.martinfowler.com/articles/dblogic.html