[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Generic XML Data Request to Explict SQL Statement

  • From: Jim Pinkelman <jimpi@e...>
  • To: xml-dev@l...
  • Date: Thu, 22 Feb 2001 13:49:46 -0600

sql statement xml
For the past two years, our company specialized in allowing
data requests to be submitted and dynamically transformed into 
explicit SQL Statements.

XML provides an OUTSTANDING abstraction layer for accessing distributed,
relational databases.

http://www.enth.com/home/sqldemo/index.asp shows our product in action.

For example, for a particular relational data model.

<QUERY Schema="Sales">
 <LEVELS>
  <LEVEL Name="Year"/>
  <LEVEL Name="ProductName">
   <CONSTRAINTS>
    <CONSTRAINT Value="Hat"/>
   </CONSTRAINTS>
  </LEVEL>
  <LEVEL Name="StoreName"/>
  <LEVEL Name="TotalUnits"/>
  <LEVEL Name="TotalDollarsPerUnit"/>
 </LEVELS>
</QUERY>

is translated into 

SELECT 
	"Time Dimension - Year"."Year" AS "Year", 
	"Product Dimension"."ProductName" AS "ProductName", 
	"Store Dimension"."StoreName" AS "StoreName", 
	SUM("Sales Fact - Year"."Units") AS "TotalUnits", 
	SUM("Sales Fact - Year"."Dollars")/SUM("Sales Fact - Year"."Units")
AS 	"TotalDollarsPerUnit" 
FROM 
	"Time Dimension - Year", 
	"Product Dimension", 
	"Store Dimension", 
	"Sales Fact - Year" 
WHERE 
	"Product Dimension"."ProductName" = 'Hat' AND 
	"Time Dimension - Year"."YearID" = "Sales Fact - Year"."YearID" AND 
	"Product Dimension"."ProductID" = "Sales Fact - Year"."ProductID"
AND 
	"Store Dimension"."StoreID" = "Sales Fact - Year"."StoreID" 
GROUP BY 
	"Time Dimension - Year"."Year", 
	"Product Dimension"."ProductName", 
	"Store Dimension"."StoreName" 
ORDER BY 1, 2, 3 


Jim Pinkelman, Ph. D.
VP - Technology
Enth
jimpi@e...
630.986.8700

Selberg wrote: 
> Are there examples of using XML as a substitute for 
> an SQL query? I mean examples of using a DTD to define 
> a valid search given as XML as the search criteria in 
> a database? 

winmail.dat


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.