Perl Cd Bookshelf [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Perl Cd Bookshelf [Electronic resources] - نسخه متنی

Mark V. Scardina, Ben ChangandJinyu Wang

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید








XML SQL Utility (XSU), and the XMLPARSER, XMLDOM, and XSLPROCESSOR packages. The two XSU PL/SQL packages allow users to insert XML documents into the database tables and retrieve SQL data in XML format through a canonical mapping. The XMLPARSER package is used for parsing XML, the XMLDOM package is used for XML DOM operations, and the XSLPROCESSOR package is used for XSLT transformations.


Since all of these packages are built on Java stored procedures, you need to initialize the Oracle Java Virtual Machine (Oracle JVM) and load the Java packages before using the functionality. This leads additional database management complexity and high maintenance cost.


In Oracle9i Release 1, a new native XML data type—XMLType—was introduced to store and query XML data in the database. XMLType provides member functions to access, extract and query XML data using XPath expressions, such as XMLType.extract(), XMLType.extractValue() and XMLType.existsNode(). Additionally, the C-based DBMS_XMLGEN PL/SQL package and a set of SQL functions, including the SYS_XMLGEN() and SYS_XMLAGG(), are provided to create XMLTypes. The new DBUri-refs allow URL-based content references in database. With these built-in XML functions and operators, processing XML is simplified, because you do not need to initialize and maintain the Java classes in the Oracle database. However, these XML functions do not scale well, because XMLTypes are stored as CLOBs and requires the building of DOM in memory before processing XML content. In addition, in this release, the text-search functionality in Oracle Text provides the XPATH support within the CONTEXT index.


Oracle9i Release 2 introduces additional XML Schema–based data storage for XMLType, which allows users to register XML schemas that conform to the W3C XML Schema recommendation. After an XML schema is registered, sets of object types and object tables are created to store XML instances conforming to the schema. The XML instance documents are “shredded” and stored in the objects. This “preparsed” storage of XML helps avoid the run-time DOM parsing needed by the CLOB-based XMLTypes in Oracle9i R1. Additionally, the Oracle XML DB is capable of rewriting the XML queries with XPath expressions into the relational SQL queries for fast data access. In this release, a new text-search index—CTXXPATH index—is integrated in XMLType to speed up the performance of XPath searching when using XMLType.existNode() function.


Along with the new storage model, Oracle9i Release 2 provides a document-centric XML DB Repository for high-performance document management in the Oracle database. The XML DB Repository provides the protocol interfaces in addition to the SQL interfaces, such as FTP, HTTP, and WebDAV, to help users easily access and manipulate the XML documents stored in the Oracle database.


Furthermore, the SQL and PL/SQL support for XML processing is enhanced in this release by including the new XMLType member functions, the new SQL/XML functions, and the C-based PL/SQL packages for processing XML data. A set of PL/SQL packages and XDBUriType are also provided for the resource management of the XML DB Repository. As previously discussed, the built-in C functions and PL/SQL packages have less management and processing overhead than the Java-based PL/SQL packages.






Note


Because C-based PL/SQL packages provide compatible APIs with better performance, the Java-based XML PL/SQL packages, including XMLPARSER, XMLDOM, and XSLPROCESSOR, are deprecated and are not included in the Oracle Database 10g release.




In Oracle Database 10g, native XML support is further enhanced by supporting a certain level of XML Schema evolution. This allows you to update the registered XML schemas for XMLTypes without performing an import/export on your data. Additionally, the existing XML applications can now have a single code line for multi-tier XML application deployment as Oracle XDK in Oracle Database 10g provides unified DOM interfaces to access XMLTypes. This support speeds up the XML processing by eliminating the need to reparse the XML documents in mid-tier and directly utilize the DOM objects stored in the database with “lazy” DOM manifestation. This feature is initially available in C and C++ for OCI and OCCI applications respectively.


The Oracle Database 10g database now contains extensive native XML functionality within the database server. The technical details of this technology will be discussed in later chapters. Table 8-1 provides a summary of the evolution of Oracle XML features.

























Table 8-1: XML Features in Oracle Database


Database Version




Major XML Features




Oracle8i




Java-based XML SQL Utility (XSU): DBMS_XMLQUERY, DBMS_XMLSAVE


Java-based XML PL/SQL packages: XMLPARSER, XSLPROCESSOR, XMLDOM


Text search for XML: Searching within XML elements/attributes using the AUTO_SECTION_GROUP/XML_SECTION_GROUP in the CONTEXT index




Oracle9i


Release 1




XMLType with CLOB storage: XMLType.extract(), XMLType.extractValue(), XMLType.existsNode()


SQL functions for XML generation and aggregation: SYS_XMLGEN(), SYS_XMLAGG()


C-based PL/SQL package for XML generation: DBMS_XMLGEN


Native DBURI-refs: UriType, DBUriType, HttpUriType, UriFactoryType


Text search for XML: XPATH searching using the PATH_SECTION_GROUP


in the CONTEXT index


Text search integration within XMLType: CTXXPATH index integrated within XMLType.existsNode()




Oracle9i


Release 2




XML Schema–based XMLType and CLOB-based XMLType


New XMLType member functions such as XMLType.transform()


XML DB Repository and protocol data access interfaces: HTTP, WebDAV over HTTP, FTP, SQL/XML support


Oracle SQL extensions for XML Processing: UPDATEXML(), XMLSEQUENCE()


C-based XML PL/SQL packages:


DBMS_XMLDOM for XML DOM operations


DBMS_XSLPROCESSOR for XSLT transformations and XPath-based data extraction


DBMS_XMLPARSER for XML parsing


DBMS_XMLTRANSFORM for XSLT transformations


DBMS_XMLSCHEMA for XML Schema operations such as XML Schema registration and validation


DBMS_XDB for XML DB Repository configuration


DBMS_XDBZ for XML DB hierarchical indexing


DBMS_XDB_VERSION for XML document versioning in XML DB Repository


Additional native DBUri-refs: XDBUriType




Oracle Database 10g Release 1




XML Schema evolution


New C-based XML PL/SQL package for inserting XML data: DBMS_XMLSTORE


Unified DOM interfaces to XMLType for OCI/OCCI applications







Note


In OracleX, most of the functionality in DBMS_XMLQUERY and DBMS_XMLSAVE is covered by the C-based PL/SQL packages—the DBMS_XMLGEN and DBMS_XMLSTORE, respectively. For better performance, you should always use the C-based packages if they cover the functionality you need. However, you generally cannot mix the two within a single XML process.




Along with the XML functionality centralized in the Oracle database, you can also take advantage of the XML interfaces in the Oracle XDK and connect to databases through JDBC or OCI to build mid-tier XML database applications. This will be discussed in the following chapters.


/ 218