f03b9fc1215e8f6a86eeba6299c1bf24.ppt
- Количество слайдов: 34
Leveraging the combined capabilities of Java, XML, and SQL with JDeveloper 9 i Olivier Le Diouris Principal Product Manager Oracle Corporation
Agenda Ÿ Oracle and XML Ÿ Oracle 9 i Practices – – – Core Technology Storage Solutions Ÿ Wrap Up
Oracle and XML Ÿ 40+ XML-enabled products across the Oracle 9 i platform Ÿ Oracle 9 i: Industry’s only complete XML database Ÿ Oracle 9 i. AS: Fastest XML enabled middle tier on the market Ÿ Oracle Internet Developer Suite: Industry’s first Java/XML IDE
Oracle and XML Standards W 3 C • Web Services WG (SOAP, WSDL, UDDI) • XMLP WG • XML Schema WG • XML Query WG OMG Java/J 2 EE • XMI Metadata WG • Component Model WG ® • J 2 EE Web Services JSR • JAXM Messaging eb. XML WG • • • OASIS/XML. org Protocol/JAXP Repository/JAXR Messaging/JAXM • TPAML • BOPC WG Rosetta. Net • RNIF WG
Best Practices Core
Oracle XML Developer’s Kit March 2001 Core Standards Support Ÿ XML Parser Ÿ XSLT Processor Ÿ XML Schema Processor Developer Productivity Ÿ XML Class Generator Ÿ XML Transviewer. Beans Database Integration Ÿ XML SQL Utility Internet Applications Ÿ XSQL Servlet/Page Processor
Parsing By DOM <TABLE> <TBODY> <TR> <TD>Buy</TD> <TD>Ticker</TD> <TD>Rating</TD> </TR> <TD>100</TD> <TD>ORCL</TD> <TD>*****</TD> </TR> </TBODY> </TABLE> <TBODY> <TR> <TD> Buy Ticker <TR> <TD> Rating <TD> 100 <TD> ORCL <TD> *****
DOM Versus DOM Ÿ DOM 1. 0 - October 1, 1998 – “ … a platform- and language-neutral interface that allows programs and scripts to dynamically access and update the New in 9 i content, structure and style of [XML] documents …” Ÿ DOM 2. 0 - November 13, 2000 – “… with support for XML 1. 0 with namespaces and adds supports for Cascading Style Sheets, events (user interface events and tree manipulation events), and enhances tree manipulations …” Ÿ DOM 3. 0 – Under development … – “… add abstract schemas support (for DTDs, XML Schema, . . . ), the ability to load and save a document or an abstract schema …”
Parsing by SAX <TABLE> <TBODY> <TR> <TD>Buy</TD> <TD>Ticker</TD> <TD>Rating</TD> </TR> <TD>100</TD> <TD>ORCL</TD> <TD>*****</TD> </TR> </TBODY> </TABLE> start document start element: table start element: tbody start element: tr start element : td characters: Buy end element: td end element: tr start element: td characters: Ticker end element: td start element: td characters: Rating end element: td end element: tr start element : td characters: 100 end element: td end element: tr start element: td characters: ORCL end element: td start element: td characters: *****
SAX versus SAX Ÿ SAX 1. 0 – May 1998 – “…SAX is a standard interface for event-based XML parsing, developed collaboratively by the members of the New XML-DEV mailing list” in 9 i Ÿ SAX 2. 0 – May 2000 – “…SAX 2 is a new version of the popular Simple API for XML, incorporating support for Namespaces, for filter chains, and for querying and setting features and properties in the parser …”
What about JAXP? Ÿ XDK 9 i, Release 9. 0. 2 supports JAXP 1. 1 for DOM, SAX and XSLT. JAXP Interfaces New in 9 i JAXP Plugability Layer DOM Parser SAX Parser XSL Processor
Document Type Definitions Most common XML Constraint Language <TABLE> <TBODY> <TR> <TD>Buy</TD> <TD>Ticker</TD> <TD>Rating</TD> </TR> <TD>100</TD> <TD>ORCL</TD> <TD>*****</TD> </TR> </TBODY> </TABLE> <!ELEMENT TABLE (TBODY)> <!ELEMENT TBODY (TR+)> <!ELEMENT TD (#PCDATA)> <!ELEMENT TR (#PCDATA | TD)*>
XML Schema W 3 C Recommendation on March 30, 2001 <TABLE> <TBODY> <TR> <TD>Buy</TD> <TD>Ticker</TD> <TD>Rating</TD> </TR> <TD>100</TD> <TD>ORCL</TD> <TD>*****</TD> </TR> </TBODY> </TABLE> <? xml version=“ 1. 0”? > <schema xmlns = “http: //www. w 3. org/1999/XMLSchema” target. Namespace = “http: //www. buystock. com/”> New <element name=“TABLE”> in 9 i <complextype> <element name=“TBODY”> <element name=“TR”> <element name=“TD”> <simple. Type base=“string”> </simple. Type> </element> </complextype> </element> </schema>
XML Schema Versus DTD’s Ÿ Oracle XDK 9 i supports the XML Schema Recommendation – – – Available in Java, C and C++ Support for. XSD files Support for data types and structures Ÿ XML Schema becoming dominant – – – Most new work around XML Schema is significantly richer than DTD Schema flexibility preferable in new XML applications
D E M O N S T R A T I O N XML Basics using the Oracle XML Parser for Java
XML and SQL Practices: XML and Oracle 9 i
Oracle XML SQL Utility in Action select * from trans Oracle XML SQL Utility Java, PLSQL, XSQL & Command <? xml version="1. 0"? > <ROWSET> <ROW num="1"> <ACTION>Buy</ACTION> <SHARES>100</SHARES> <SYMBOL>ORCL</SYMBOL> <ACCOUNT>89 -344</RATING> </ROW> <ROW num="2"> <ACTION>Sell</ACTION> <SHARES>100</SHARES> <SYMBOL>IBM</SYMBOL> <ACCOUNT>89 -344</ACCOUNT> </ROWSET>
Oracle XML SQL Utility: XML Generation Ÿ Take select statements, execute them and wrap the results in SQL Ÿ Available in: – – Java Command line - PLSQL - XSQL Servlet Ÿ Results available as: – – – DOM CLOB Schema/DTD - String - SAX New in 9 i
D E M O N S T R A T I O N XML and SQL Oracle 9 i
Oracle XSQL Servlet: Dynamic XML Applications HTTP XML WML HTML HDML PDF. . . XSQL Servlet XSLT Processor XML Template <xml> <col 1>a</col 1> <xsql: action <col 2>1</col 2> <xsql: action XSL <xsl: stylesheet> <xsl: template> </xsl: template> XML Datagram <xml> <col 1>a</col 1> <col 2>1</col 2> Business Logic (BC 4 J, JMS, JDBC, SOAP)
D E M O N S T R A T I O N An XML Multi. Client Application…
XML Storage: Relational and Object Relational Ÿ Use CLOB, Varchar 2, LOB, BLOB – Full relational capabilities kept Ÿ Leverage object relational – Maps naturally to XML hierarchies Ÿ Issues regardless of choice – Lose XML context Ÿ Ordering Ÿ Original document can be difficult to re-create – Documents often ‘locked’ in CLOBs or BLOBs
Goals of Oracle 9 i and XML Storage Ÿ Make XML a first-class datatype in the database Ÿ Enable SQL operations on XML Ÿ Enable XML operations on SQL Ÿ Provide the basis of a rich content management infrastructure – Storage, Indexing, Searching, Management, Integrity
XMLType create table PURCHASEORDER ( PO_ID NUMBER(3), PODOCUMENT sys. xmltype); INSERT INTO PURCHASEORDER values (5, sys. xmltype. createxml(‘<? xml version="1. 0"? > <ship-to><city>San Francisco</city> </ship-to> <bill-to><company>Oracle</company> </bill-to> <Line. Item><book>Building XML Applications</book> <price>35. 99</price> <quantity>10</quantity> </Line. Item>’));
D E M O N S T R A T I O N XML in Oracle 9 i
Best Practices Development Solutions
Oracle 9 i Application Server Collaborate with your Stakeholders Integrate Your Business Build and Deploy Dynamic Web Sites and Internet Applications J 2 EE and XML Core Extract Business Intelligence Create Personalized Portals Wireless Enable Portals Accelerate Web Site Performance with Caching
Oracle 9 i. AS Integration Services and XML • Shipping adapters to ERP and CRM vendors • An integration framework built for B 2 B and A 2 A integration Oracle 9 i. AS Metadata AQ Hub App 1 Workflow Adapter XML Business Event Oracle 8 i Advanced Queuing Adapter XML App 2
Oracle 9 i AS Wireless Edition and XML Oracle 9 i AS Wireless Edition Any Device Any Gateway Any Markup Personalized Any Content Ÿ Nokia Ÿ Motorola Ÿ Ericsson Ÿ Palm Ÿ RIM Pagers Ÿ Blackberry Ÿ Any Network Ÿ …. . Ÿ Nokia Ÿ Motorola Ÿ Ericsson Ÿ Phone. com Ÿ CMG Ÿ Tantau Ÿ Infinity Ÿ. . . Ÿ By User Ÿ By Group Ÿ By Device Ÿ By Location Ÿ By Language Ÿ. . . Ÿ Any Web Site Ÿ Any HTML Page Ÿ Any XML Page Ÿ Any Database Ÿ Any servlet Ÿ Any JSP Ÿ Any XSP Ÿ Any e-mail Ÿ. . . Any Browser Ÿ HTML Ÿ XML Ÿ HDML Ÿ WML Ÿ Tiny. HTML Ÿ TTML Ÿ CHTML Ÿ STKML Ÿ Vo. XML Ÿ Voice. XML Ÿ ….
Oracle 9 i. AS Business Intelligence and XML Ÿ Oracle 9 i. AS Reports – – Leverage existing reports by outputting XML Define report definitions in XML Ÿ Oracle 9 i. AS Discoverer – – Underlying infrastructure is XML driven Opportunity to customize business intelligence to mobile devices
Oracle 9 i JDeveloper: XML Support Ÿ Schema Driven XML Editor Ÿ Integrated Oracle XDK for Java – – – Parser, XSLT Transformer, SQL utility XSQL pages – Run and Debug inside the IDE XML Schema support Ÿ Application Integration – – XML Messaging via JMS Built-in web service development Ÿ Web Services – Discover, Bind, Invoke, Publish
Agenda ü Oracle 9 i and XML ü Best Practices ü ü ü Core Technology Storage Development ü Wrap Up
f03b9fc1215e8f6a86eeba6299c1bf24.ppt