XPath Part 6
Home Up

 

XPath Part 7 ]

Fast, reliable data access for ODBC, JDBC, ADO.NET and XML
Predictive Analytics World 2009, San Francisco
Need an expert for Java, XML and Web Services projects?
88x31 CTIX Logo - Clear Background
Got SOX compliance?
Movielink Logo 88x31
IBM eserver xSeries 306m 8849 - P4 3.4 GHz
Memory
PROLIANT BL20P G3 XEON 3.6G 2P
iTunes Logo 88x31-1

 

XPath Navigation Limits SQL/XML Databases (Part 6)

 

TechNotes
Logic in DB
Beyond Java

Data Access
SOX

SQL/XML
Restructuring

Trees

Open Source
BizIntel

MySQL

Drivers
ODBC
JDBC
OLE DB
.NET

Podcast
SQL:2003

MS SQL 2005
XML DBs

XQuery

Webcast
XQuery
SQL:2003
MS SQL 2005

 

<<Prev 1 2 3 4 5 6 7 8 9 Next >>

Relational Hierarchical View Defined

This first SQLfX® beta example demonstrates the creation of the relational Employee logical hierarchical view EmpView based on existing relational tables. This includes the Left Outer Join operation that models (via syntax) and defines (via semantics) the processing of the full nonlinear hierarchical data structure which is shown in Example 1 below.
 

Fast, reliable data access for ODBC, JDBC, ADO.NET and XML

The EmpView hierarchical view is then invoked in a SQLfX® query which automatically produces structured XML in its default attribute format. This view contains ON clause linear data filtering by the addition of AND DpndCode=’D’ for the Dpnd node. This is comparable to XPath data filtering. The ON clause’s main use is to link logical database objects like relation tables or model physical database objects such as XML elements into hierarchical structures.

 

Example 1: EmpView structure.

CREATE VIEW EmpView AS
SELECT * FROM Emp
LEFT JOIN Dpnd ON EmpID=DpndEmpID
AND DpndCode=’D’
LEFT JOIN Eaddr ON EmpCustID=EaddrCustID
;

 
EmpView

SELECT EmpID, DpndID, EaddrID
FROM EmpView

<root>
   <emp empid="Emp01">
     <dpnd dpndid="Dpnd01"/>
     <eaddr eaddrid="Addr01"/>
   </emp>
     <emp empid="Emp02">
     <eaddr eaddrid="Addr03"/>
   </emp>
</root>

 

<< Prev 1 2 3 4 5 6 7 8 9 Next >>


Database Server Watch  SQL Summit Home Page    Articles 

Visit GridSummit.com (Grid Computing Knowledge Portal) Visit WebServicesSummit.com: XML and Web Services Portal

 

© 2008, Ken North Computing LLC, All rights reserved.

 

120x90
  Movielink Generic 120X90 Animated