Interoperability of routines

The interoperability of routines of different types and with different programming implementations ensures that routines can be highly re-useable modules throughout the life-span of a database system.

Because code modules are often implemented by different programmers with programming expertise in different programming languages, and because it is generally desirable to reuse code wherever possible to save on development time and costs, the routine infrastructure is designed to support a high degree of routine interoperability.

Interoperability of routines is characterized by the ability to reference and invoke routines of different types and implementations from other routines seamlessly and without any additional requirements. Routines are interoperable in the following ways:
  • A client application in one programming language can invoke routines that are implemented in a different programming language.
    • For example, C client applications can invoke Java runtime routines.
  • A routine can invoke another routine regardless of the routine type or the implementation language of the routine.
    • For example a Java™ procedure (one type of routine) can invoke an SQL scalar function (another type of routine with a different implementation language).
  • A routine created in a database server on one operating system can be invoked from a database client running on a different operating system.

There are various kinds of routines that address particular functional needs and various routine implementations. The choice of routine type and implementation can impact the degree to which the benefits listed previously are exhibited. In general, routines are a powerful way of encapsulating logic so that you can extend your SQL and improve the structure, maintenance, and potentially the performance of your applications.