G-2120: Try to have a single location to define your types.

Minor

Changeability

Reason

Single point of change when changing the data type. No need to argue where to define types or where to look for existing definitions.

A single location could be either a type specification package or the database (database-defined types).

Example (bad)

CREATE OR REPLACE PACKAGE BODY my_package IS
   PROCEDURE my_proc IS
      SUBTYPE big_string_type IS VARCHAR2(1000 CHAR);
      l_note big_string_type;
   BEGIN
      l_note := some_function();
   END my_proc;
END my_package;
/

Example (good)

CREATE OR REPLACE PACKAGE types_up IS
   SUBTYPE big_string_type IS VARCHAR2(1000 CHAR);
END types_up;
/

CREATE OR REPLACE PACKAGE BODY my_package IS
   PROCEDURE my_proc IS
      l_note types_up.big_string_type;
   BEGIN
      l_note := some_function();
   END my_proc;
END my_package;
/