Chapter 8. Communicating with the Outside World

One big overall trend in computers is the growing "interconnectedness" of systems. There is a greater and greater assumption that my organization's systems and data should be connected to my supplier's systems and to my customer's systems (in a secure and controlled manner, of course). This is true whether we're talking about libraries, banks, or trucking companies.

A relatively simple and safe way that systems can communicate is by automatically sending email to the users of the system. For example, in the library application we've been developing, the system could send email to patrons who want to find out when a particular book is available. With PL/SQL, there are several ways to accomplish this task, and in this chapter we'll examine one of these in detail.

Less exotic, but no less interesting, PL/SQL applications may also need to "communicate" by reading and writing files that live in the operating system. Although the library application won't really need this feature, it is useful to know about, so I will present an example of using Oracle's built-in UTL_FILE package to load a file via PL/SQL.

Another increasingly common interconnection between systems occurs when one organization retrieves structured data from a remote site. For example, a library might want to retrieve catalog information from another source rather than key it all in by hand. We'll look at PL/SQL's built-in UTL_HTTP package as one part of an approach ...

Get Learning Oracle PL/SQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.