150 likes | 243 Views
Database Solutions for Storing and Retrieving XML Documents. IBM’s DB2 Relational Database with the XML Extender. XML Extender Features. XML document retrieval and generation from SQL queries XML document storage data management functions. XML document retrieval.
E N D
XML Extender Features • XML document retrieval and generation from SQL queries • XML document storage • data management functions
XML document retrieval • Query syntax adheres to W3C standards Extensive Stylesheet Language Transformation(XSLI) and XML Path Language(Xpath) • entire documents can be retrieved • XML elements can be dynamically extracted
XML document generation • XML Extender provides stored procedures to generate XML documents from existing data stored in DB2 tables
XML document storage • DB2’s XML Extender Serves as a Repository for XML documents and their document type definitions (DTDs) • an entire document can be stored as an XML user-defined column • the document can be decomposed into multiple tables and columns
XML column option • Document stored as user-defined type column • three XML user-defined types(UDTs): XMLCLOB, XMLVARCHAR and XMLfile • user-defined functions provided for insert, select and update operations
UDTs • XMLCLOB and XMLVARCHAR store an XML document as a CLOB and a VARCHAR respectively in DB2 • XMLFile stores an XML document as a file on a local file system
XML collection • An XML collection is a set of relational tables that contain data mapped to an XML document • Data access definition(DAD) is used to define the mapping of document type definitions(DTD) to relational tables and columns • stored procedures for select, insert, update
XML column vs XML collection • XML column provides a simple way to manage XML documents and provides fast searching and indexing capabilities • ideal for static data not frequently updated • better performance since no need to compose the document from DB2 data
XML collection provides a better mapping for an XML document which consists of multiple collections • XML collection also supports existing DB2 data by providing a mechanism to generate an XML document for data interchange
Provides Data Management Functions • Data integrity • security • recoverability • manageability
Invoking DB2 XML Extender • You can invoke DB2 XML Extender in a data access JavaBean through through WebSphere or in a Net.Data macro • It can be used with DB2 or any ODBC-compliant database
Other Database Solutions • MicroSoft SQL Server • Oracle’s Oracle8i database
Conclusion • IBM DB2 XML Extender and DB2 Universal Net.Data provide an end-to-end solution for storing and retrieving XML documents for business-to-business and business-to-consumer (with a browser) processing.