Oracle9i XML Database Developer's Guide - Oracle XML DB Release 2 (9.2) Part Number A96620-02 |
|
|
View PDF |
This chapter provides some preliminary design criteria for consideration when planning your Oracle XML DB solution. It contains the following sections:
Oracle XML DB is installed as part of the General Purpose Database shipping with Oracle9i Release 2 (9.2) database. If you need to perform a manual installation or de-installation of the Oracle XML DB, see Appendix A, "Installing and Configuring Oracle XML DB" for further information.
Oracle XML DB is suited for any application where some or all of the data processed by the application is represented using XML. Oracle XML DB provides for high performance ingestion, storage, processing and retrieval of XML data. Additionally, it also provides the ability to quickly and easily generate XML from existing relational data.
The type of applications that Oracle XML DB is particularly suited to include:
A typical Oracle XML DB application has one or more of the following requirements and characteristics:
Oracle XML DB provides you with the ability to fine tune how XML documents will be stored and processed in Oracle9i database. Depending on the nature of the application being developed, XML storage must have at least one of the following features
This section discusses the preliminary design criteria you can consider when planning your Oracle XML DB application. Figure 2-1 provides an overview of your main design options for building Oracle XML DB applications.
Will your data be highly structured (mostly XML), semi- structured (pseudo- structured), or mostly non-structured? If highly structured, will your table(s) be XML schema-based or non-schema-based? See "Oracle XML DB Application Design: a. How Structured Is Your Data?" and Chapter 3, "Using Oracle XML DB".
How will other applications and users access your XML and other data? How secure must the access be? Do you need versioning? See "Oracle XML DB Application Design: b. Access Models".
In which language(s) will you be programming your application? See "Oracle XML DB Application Design: c. Application Language".
Will you need to generate XML? See Chapter 10, "Generating XML Data from the Database".
How often will XML documents be accessed, updated, and manipulated? Will you need to update fragments or the whole document?
Will you need to transform the XML to HTML, WML, or other languages, and how will your application transform the XML? See Chapter 6, "Transforming and Validating XMLType Data".
Does your application need to be primarily database resident or work in both database and middle tier?
Is your application data-centric, document- and content-centric, or integrated (is both data- and document-centric). "Oracle XML DB Application Design: d. Processing Models".
Will you be exchanging XML data with other applications, across gateways? Will you need Advanced Queueing (AQ) or SOAP compliance? See Chapter 24, "Exchanging XML Data Using Advanced Queueing (AQ) and Oracle Streams".
How and where will you store the data, XML data, XML schema, and so on? See "Oracle XML DB Design: Storage Models".
Figure 2-2 shows the following data structure categories and associated suggested storage options:
Also consider the following data modeling questions:
XMLType
tables or views or in files in Repository folders. With this design you have many access options including path- and query-based access through Resource Views.Figure 2-3 shows the two main data access modes to consider when designing your Oracle XML DB applications:
DBMS_XDB
. See Chapter 16, "Oracle XML DB Resource API for PL/SQL (DBMS_XDB)".These options for accessing Repository data are also discussed in Chapter 13, "Oracle XML DB Foldering".
You can also consider the following access model criteria:
You can program your Oracle XML DB applications in the following languages:
The following processing options are available and should be considered when designing your Oracle XML DB application:
XMLType
since Oracle9i Release 1 (9.0.1), you can keep white spaces. If you are using XML schema, see the discussion on DOM fidelity in Chapter 5, "Structured Mapping of XMLType".XMLType
views. Will you need to generate or regenerate XML? If yes, see Chapter 10, "Generating XML Data from the Database".How often will XML documents be accessed, updated, and manipulated? See Chapter 4, "Using XMLType" and Chapter 15, "RESOURCE_VIEW and PATH_VIEW".
Will you need to update fragments or the whole document? You can use XPath to specify individual elements and attributes of your document during updates, without rewriting the entire document. This is more efficient, especially for large XML documents. Chapter 5, "Structured Mapping of XMLType".
Is your application data-centric, document- and content-centric, or integrated (is both data- and document-centric)? See Chapter 3, "Using Oracle XML DB".
Advanced Queueing (AQ) supports XML and XMLType
applications. You can create queues with payloads that contain XMLType
attributes. These can be used for transmitting and storing messages that contain XML documents. By defining Oracle objects with XMLType
attributes, you can do the following:
XMLType
attributes using the operators existsNode()
, extract()
, and so on.XMLType
.XMLType
operators such as existsNode()
and extract()
.
Figure 2-4 summarizes the Oracle XML DB storage options with regards to using XMLType
tables or views. If you have existing or legacy relational data, use XMLType
Views.
Regardless of which storage options you choose for your Oracle XML DB application, Oracle XML DB provides the same functionality. However, the option you choose will affect your application's performance and the data fidelity (data accuracy).
Currently, the three main storage options for Oracle XML DB applications are:
The storage options are totally independent of the following criteria:
If you are using XMLType
tables you can store your data in:
Use XMLType
views if you have existing relational data. You can use the following options to define the XMLType
views: