Predefined Object Types
Oracle9i implements a collection of useful, predefined object types. These include:
- XMLType
Use this to store and manipulate XML data.
- Various URI types
Use these to store uniform resource identifiers (such as HTML addresses).
- Various “Any” types
Use these to define a PL/SQL variable that can hold any type of data.
In the following sections, we provide brief introductions to these predefined object types and then point you to sources of more information.
The XMLType Type
XML (Extensible Markup Language) is fast becoming a very important technology to understand. Did we say “fast becoming”? Strike that—XML is important right now, and the predefined object type XMLType enables you to store XML data in an Oracle database and manipulate that XML data from within SQL and PL/SQL.
XML is a huge subject that we can’t hope to cover in detail. Instead, we will settle for familiarizing you with XMLType so that you understand how important it is and what you can do with it. To learn more about using XML with Oracle, we recommend Steve Muench’s book, Building Oracle XML Applications (O’Reilly). To learn more about XML in general, you might try Learning XML by Erik T. Ray (O’Reilly).
Tip
In Oracle9i Release 1, you need to use the
“SYS.” prefix when referencing the
XMLType object type. Release 2 allows synonyms to point to object
types, and the database creation script
($ORACLE_HOME/rdbms/admin/dbmsxmlt.sql
) that creates XMLType now also creates the public synonym XMLTYPE, ...
Get Oracle PL/SQL Programming, Third Edition 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.