Presentation is loading. Please wait.

Presentation is loading. Please wait.

Gaining and keeping competitive advantage through J2EE and XML interoperability Dimitri Maesfranckx Product Manager.

Similar presentations


Presentation on theme: "Gaining and keeping competitive advantage through J2EE and XML interoperability Dimitri Maesfranckx Product Manager."— Presentation transcript:

1 Gaining and keeping competitive advantage through J2EE and XML interoperability Dimitri Maesfranckx Product Manager

2 Content n Reality n Database vendors n Introduction n Application Scenario n Builder n Query Example n Features n Key Advantages n Q&A

3 Reality n XML versus databases “The truth of the matter. The RDBMS is not going anywhere anytime soon, if ever. Even ignoring serious issues such as relational data representation in XML, the DBMS technology is a core part of too many applications in use today. Although XML may be a realistic possibility for some smaller applications without legacy data or legacy application dependencies, most large-scale production applications must interface with existing data. This data is almost always maintained in a relational database.” JAVA and XML (Page 339) By Brett McLaughlin – O’REILLY ®

4 How Can I Access Data Using XML? n Not an easy answer! l JDBC/ODBC/ADO/OLE DB l XQL l Xquery l Xpath l HTTP extensions l DBMS extensions l XML-QL l SQL extensions l …

5 DB Standard APIs n ODBC l SQLExecDirect (hstmt, “Select * from Inventory”, SQL_NTS) l SQLSetStmtAttr (hstmt, SQL_PERSIST_AS_XML, “//myweb/inventorylist/inventory.xml”, SQL_NTS)myweb/inventorylist/inventory.xml n ADO l rsXML.Open “Select * from Inventory”, conn l rsXML.Save “//myweb/inventorylist/inventory.xml”, adPersistXMLmyweb/inventorylist/inventory.xml n JDBC … similar using Webrowset interface

6 DBMS extentions n SQL Server l Specify SQL Queries into the URL http://IISServer/nwind?sql=SELECT+*+FROM+Invent ory+FOR+XML+AUTO&root=root l Returns query as XML document l Specify SQL Query Templates in the URL http://IISServer/nwind/QueryFile.xml

7 DBMS extentions n Oracle l XSQL Pages - XML formatted servlet definition that creates or consumes XML based on the underlying database http://MyServer/InventoryToday.xsql?id=12 l Where XSQL defined as: SELECT * FROM Inventory WHERE ID = '{@id}‘

8 DBMS extentions n IBM l IBM DB2 UDB (7.1) - XML Extender l DAD or Document Access Definition file l Flexible query or table.column based mapping l Stored procedure programming model (Java,C++,...) l Both retrieve and update functionality l XML results are ‘dumped’ in a special DB2 table

9 XQuery n Example: Return a "flat" list of supplier names and their part descriptions, in alphabetic order. FOR $sp IN document("sp.xml")//sp_tuple, $p IN document("p.xml")//p_tuple[pno = $sp/pno], $s IN document("s.xml")//s_tuple[sno = $sp/sno] RETURN $s/sname, $p/descrip SORTBY (sname, descrip)

10 jXTransformer Introduction n Defines grammar to retrieve data and transform this into complex XML structures. n jXTransformer API that processes the Query, returns the data in the required XML structure. n jXTransformer Builder GUI tool to help you build and test queries. n Uses a DataDirect JDBC J2EE certified drivers to communicate with the RDBMS.

11 jXTransformer Query with JDBC application scenario JAVA Application with jXTransformer Query DataDirect JDBC Driver RDBMS jXTranformer API XML Document

12 jXTransformer Builder n Create and modify quickly without having to know the syntax. n Check and test syntax and semantics.

13 jXTransformer Query Example SELECT e.EmployeeID, e.FirstName, e.LastName, e.Title, e.HireDate, e.Salary FROM Employees e WHERE e.HireDate = {d ’2000-01-01’}

14 SELECT xml_element(’Employees_Info’ xml_attribute(’ID’, e.EmployeeID), xml_element(’name’, xml_element(’first’,e.FirstName), xml_element(’last’, e.LastName) ), xml_element(’title’, e.Title), xml_element(’hiredate’,e.HireDate), xml_element(’salary’, e.Salary) ) FROM Employees e WHERE e.HireDate = {d ’2000-01-01’} jXTransformer Query Example

15 Jane Smith Director 2000-01-01 120000 jXTransformer Query Example

16 jXTransformer Features n Any relational DB supported by the DataDirect JDBC drivers. n DOM, JDOM, SAX and reader/writer object interfaces. n DTDs, schemas, namespaces and CDATA. n Nested jXTransformer queries. n Document-level processing instructions. n Parameter markers, SQL92 select list expressions and JDBC scalar functions.

17 jXTransformer Key Advantages n Uniform and database independent n Fraction of the usual required resources n Leverage existing knowledge n Portable code, portable data

18 Q&A jXTransformer allows you to retrieve data from relational databases and transform that data into complex XML structures. All that is required is a JDBC connection with a DataDirect JDBC driver. jXTransformer is flexible and powerful, allowing you to structure the data any way you want it in the resulting XML document and create well-formed and valid XML documents for data exchange. The jXTransformer Builder tool makes it easy for you to build and test jXTransformer queries. Dimitri.Maesfranckx@MERANT.COM


Download ppt "Gaining and keeping competitive advantage through J2EE and XML interoperability Dimitri Maesfranckx Product Manager."

Similar presentations


Ads by Google