\small\begin{verbatim}
CREATE TYPE Member_Type AS OBJECT
 (Country VARCHAR2(4),
  Type VARCHAR2(30));
/
CREATE TYPE Member_List_Type AS
 TABLE OF Member_Type;
/
\end{verbatim}
\begin{sql}
CREATE OR REPLACE TYPE Organization\_Type AS OBJECT \\
\>(\>Name VARCHAR2(80), \\
\>\>  Abbrev VARCHAR2(12), \\
\>\>  Members {\magenta Member\_List\_Type}, \\
\>\>  Established DATE, \\
\>\>  has\_hq\_in {\blue REF City\_Type}, \\
\>\>  MEMBER FUNCTION is\_member (the\_country IN VARCHAR2) \\
\>\> -\/- {\magenta EU.is\_member('SLO') = 'membership applicant'} \\
\>\>\> RETURN VARCHAR2, \\
\>\>  MEMBER FUNCTION people RETURN NUMBER, \\
\>\>  MEMBER FUNCTION number\_of\_members RETURN NUMBER, \\
\>\>  MEMBER PROCEDURE add\_member  \\
\>\>\>   (the\_country IN VARCHAR2, the\_type IN VARCHAR2), \\
\>\>  PRAGMA RESTRICT\_REFERENCES (is\_member, WNPS, WNDS), \\
\>\>  PRAGMA RESTRICT\_REFERENCES (people, WNDS, WNPS), \\
\>\>  PRAGMA RESTRICT\_REFERENCES (number\_of\_members, WNDS, WNPS)); \\
/
\end{sql}
