优点和在Oracle中使用包的优缺点 [英] Pros and cons of using packages in Oracle

查看:1027
本文介绍了优点和在Oracle中使用包的优缺点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是相当新的使用包。我的团队是决定是否要使用我们的应用程序包。我们正在使用内联SQL目前4的应用程序。我们决定把每一个SQL语句的存储过程,然后逻辑分组存储过程分成包(这些存储过程将在应用程序之间共享)。什么是潜在的优点和使用包的利​​弊。

I am fairly new to using packages. My team is deciding on whether or not to use packages in our applications. We have 4 applications that are using in-line sql currently. We are deciding on putting each sql statement in a stored procedure and then logically grouping the Stored procedure into packages(These stored procedures will be shared among the applications). What are the potential pros and cons of using packages.

我们的应用程序使用C#写的asp.net。

Our applications are written in asp.net using c#.

推荐答案

所以,你要开始一个关于优点与使用软件包的缺点辩论?好吧,那么我会离开你的缺点一部分,如果你能与我们分享。我只想与你一起分享塔伊的优势,而不是我自己的话,因为那将是什么样托马斯凯特已经说过的这里

So you want to start a debate about the advantages versus the disadvantages of using a package? Ok, then I would leave the disadvantages part on you if you could share with us. I will just share with you tye advantages, not in my own words, since it would be a repetition of what Thomas Kyte already said here:


      
  • 打破依赖链(无级联失效当你安装一个新的包体 - 如果
      你必须调用程序的程序 - 编译一会作废的数据库)

  • break the dependency chain (no cascading invalidations when you install a new package body -- if you have procedures that call procedures -- compiling one will invalidate your database)

支持封装 - 我将被允许写模块化,易于理解code - 而
  那么铁板一块,不理解的过程

support encapsulation -- I will be allowed to write MODULAR, easy to understand code -- rather then MONOLITHIC, non-understandable procedures

增加我的空间可测量的。包名必须在架构独特,但我可以有
  跨越具有相同名称的包很多程序没有碰撞

increase my namespace measurably. package names have to be unique in a schema, but I can have many procedures across packages with the same name without colliding

支持重载

支持会话变量的时候,你需要他们

support session variables when you need them

促进整体良好的编码技术,东西,让你写code,它是模块化的,
  可以理解的,在逻辑上组合在一起....

promote overall good coding techniques, stuff that lets you write code that is modular, understandable, logically grouped together....

如果你是一个程序员 - 你会看到比独立的激增包的好处
  程序心跳。

If you are a programmer - you would see the benefits of packages over a proliferation of standalone procedures in a heartbeat.

这篇关于优点和在Oracle中使用包的优缺点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆