简化包和视图的创建(streamlining creating of packages and views)

编程入门 行业动态 更新时间:2024-10-27 14:19:58
简化包和视图的创建(streamlining creating of packages and views)

我有几个SQL脚本设置应用程序的数据库。 几乎没有创建包含少量视图引用的包的脚本,并且同样具有创建包含引用的视图的脚本。

有没有办法将这两个脚本分开,然后分别单独创建包或视图。

或任何其他工作就可以了。

I have few SQL scripts which setups the db of an app. have few scripts creating packages which has few references of views, and similarly have scripts for creating views which has references of packages.

Is there a way to separate these two scripts which would then individually create only packages or views respectively.

Or any alternate to work on this.

最满意答案

我认为你必须手动计算参考图形,然后相应地命令脚本的执行。

因此,您需要创建一组脚本views1.sql,views2.sql,...和packages1.sql,packages2.sql,... Views1.sql仅包含未引用任何软件包的视图。 Packages1.sql仅包含不引用任何视图的软件包。 Views2.sql仅包含引用来自packages1.sql的包的视图。 Packages2.sql仅包含引用views1.sql中的视图的包。

等到你完成了。

I think you have to calculate the reference graph manually and then order the execution of the scripts accordingly.

So you need to create a set of scripts views1.sql, views2.sql, ... and packages1.sql, packages2.sql, ... Views1.sql contains only views that are not referencing any packages. Packages1.sql contains only packages that are not referencing any views. Views2.sql contains only views that are referencing packages from packages1.sql. Packages2.sql contains only packages that are referencing views from views1.sql.

And so on until you are finished.

更多推荐

本文发布于:2023-07-24 00:06:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1239024.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:视图   streamlining   creating   packages   views

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!