DBMS_ALERT:
Package DBMS_ALERT database triggers to be used to alert an application when specific database values modifies. The alerts are asynchronous and transaction based (that is, they operate independently of any timing mechanism). For instance, a company may use this package to update the value of its investment portfolio as new stock and bond quotes arrive.
Guidelines
When writing packages, they should be as common as possible so in which they can be reused in future applications. Prevent writing packages which duplicate some feature already provided through Oracle.
Package specifications reflect the design of the application. Then, define them before the package bodies. Place in a specification only the items, types, and subprograms which must be visible to users of the package. In That way, other developers cannot misuse the package through basing their code on irrelevant implementation details.
To decrease the requirement for recompiling when code is modified, place as few items as possible in a package specification. Modifications to a package body do not needs Oracle to recompile dependent procedures. Therefore, changes to a package specification needed Oracle to recompile every stored subprogram in which references the package.