由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - Stored Procedure?
相关主题
为啥Oracle stored procedure 里面不建议用 temporary table?请教:how to call a COM object in a stored procedure?
请问怎样找到StoredProcedures的修改记录?Stored Procedure的Is和As有什么区别,还有 ······
Help: stored procedure in oracle[合集] Stored Procedure的Is和As有什么区别,还有 ······
Re: Job with Oracle PL? (转载)#在SQL里啥子意思
SQL debug step into a store procedure from another one (转载)请问如何查看一个oracle数据库里有哪些stored procedures
what is PL/SQL ?改写(migrate) stored proc 问题
请推荐关于Stored Procedure的书如何让SQL 2005 CLR Trigger返回结果给Stored Procedure用?
Can I use array in SQL stored procedure?怎么样提高SQL SERVER的编程水平?
相关话题的讨论汇总
话题: stored话题: procedure话题: sql话题: oracle话题: dynamic
进入Database版参与讨论
1 (共1页)
p******a
发帖数: 4
1
数据库APPLICATION PROGRAMMING,比如C程序调用SQL,
只用STORED PROCEDURE,够不够?
我的意思是程序中不出现SELECT 。。。,一切数据库操作都是
对STORED PROCEDURE的调用,可不可以?会有什么问题?
请高手指教
s*k
发帖数: 144
2

Of course you can. But that is not a good database programming
practice.You may need to create too many stored procedures on
server and some only too trivial to bother your DBA to
create and consume system resource of server.

【在 p******a 的大作中提到】
: 数据库APPLICATION PROGRAMMING,比如C程序调用SQL,
: 只用STORED PROCEDURE,够不够?
: 我的意思是程序中不出现SELECT 。。。,一切数据库操作都是
: 对STORED PROCEDURE的调用,可不可以?会有什么问题?
: 请高手指教

a*****i
发帖数: 4391
3

Depends on what you need them for.
1: If you need a lot of interactive actions between your database and the
server, it is better to write the application in C/Perl/Java/whatever
language you are familiar with.
2: Otherwise, stored procedure runs faster. I dont know about in other DBs,
but Oracle's store procedure has a pretty well defined control structure in
which you can pretty much do everything you need to do .
3: You can not have DDL in stored proecedure body. That is a drawback.

【在 p******a 的大作中提到】
: 数据库APPLICATION PROGRAMMING,比如C程序调用SQL,
: 只用STORED PROCEDURE,够不够?
: 我的意思是程序中不出现SELECT 。。。,一切数据库操作都是
: 对STORED PROCEDURE的调用,可不可以?会有什么问题?
: 请高手指教

p******a
发帖数: 4
4
Thanks. I will use Stored Procedure for SQL only.
As you said , DDL cannot be put in SP.
But I doubt if I can put dynamic SQL in it?
How about CLI? For example, a web search engine needs to
form queries on the fly, can I use SP in this case?
Thanks again!

【在 a*****i 的大作中提到】
:
: Depends on what you need them for.
: 1: If you need a lot of interactive actions between your database and the
: server, it is better to write the application in C/Perl/Java/whatever
: language you are familiar with.
: 2: Otherwise, stored procedure runs faster. I dont know about in other DBs,
: but Oracle's store procedure has a pretty well defined control structure in
: which you can pretty much do everything you need to do .
: 3: You can not have DDL in stored proecedure body. That is a drawback.

a*****i
发帖数: 4391
5
Oracle supports Dynamic SQL. So, go ahead and stop worrying:)
I am not sure how good the performance is though. I had done
some scripting in dynamic SQL, but the table was relatively small,
so the performance was really not a big issue there.

Hmm In that case, the best choice is to use Oracle webserver.
(I dont work for Oracle, btw.)

【在 p******a 的大作中提到】
: Thanks. I will use Stored Procedure for SQL only.
: As you said , DDL cannot be put in SP.
: But I doubt if I can put dynamic SQL in it?
: How about CLI? For example, a web search engine needs to
: form queries on the fly, can I use SP in this case?
: Thanks again!

1 (共1页)
进入Database版参与讨论
相关主题
怎么样提高SQL SERVER的编程水平?SQL debug step into a store procedure from another one (转载)
【有什么说可以恶补一下data warehousing的知识?】what is PL/SQL ?
请教有关junior level的database support的面试请推荐关于Stored Procedure的书
SQL server stored procedure 求助Can I use array in SQL stored procedure?
为啥Oracle stored procedure 里面不建议用 temporary table?请教:how to call a COM object in a stored procedure?
请问怎样找到StoredProcedures的修改记录?Stored Procedure的Is和As有什么区别,还有 ······
Help: stored procedure in oracle[合集] Stored Procedure的Is和As有什么区别,还有 ······
Re: Job with Oracle PL? (转载)#在SQL里啥子意思
相关话题的讨论汇总
话题: stored话题: procedure话题: sql话题: oracle话题: dynamic