Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Oracle Built−in Packages- P4: Ah, for the good old days of Version 1.0 of PL /SQL! Life was so simple then. No stored procedures or functions and certainly no packages. You had your set of built−in functions, like SUBSTR and TO_DATE. You had the IF statement and various kinds of loops. With these tools at hand, you built your batch−processing scripts for execution in SQL*Plus, and you coded your triggers in SQL*Forms 3.0, and you went home at night content with a good day's work done. | Appendix A What s on the Companion Disk 1 With Oracle8 and its support for external programs in PL SQL this is no longer quite true. With PL SQL8 you will be able to build your own packages that in turn call C programs. See Chapter 21 of Oracle PL SQL Programming Second Edition for more information about this feature. However I don t want to sound as if I m complaining. I m very glad Oracle took advantage of packages and C and whatever else they could and not just because it gave me the excuse to write another book . The result is a much more powerful and useful PL SQL. Let s look at an example to give you a feeling for the way Oracle used the package structure to revolutionize the code you write. Consider Oracle Server Version 7.1 the Parallel Everything database as Oracle Corporation called it in its marketing materials. Oracle 7.1 offered parallel query parallel index update and many other features that take advantage of the symmetric multiprocessors widely available today. This parallelization of the RDBMS offered significant improvements in database performance and we should all be glad for that. But there is fortunately so much more for which to be thankful. 1.1.1 A Kinder More Sharing Oracle Oracle Corporation didn t simply utilize this parallelization technology inside its own code. It also made this same technology available to us in a safe way through the specification of the DBMS_PIPE package. While DBMS_PIPE is probably not used by the Oracle Server itself that built-in package certainly accesses the same parallelization technology used by the RDBMS. The advantages for a PL SQL developer are far-reaching. Even if DBMS_PIPE originally grew out of a need by Oracle Corporation to enhance its own performance the advantages of DBMS_PIPE are not confined to the Oracle RDBMS. Any developer can use DBMS_PIPE in all sorts of new and creative ways. You can parallelize your own programs. You can communicate between a client program in Oracle Forms and a .