Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: xpath to sql translation >Thread Next - Re: xpath to sql translation Re: xpath to sql translationTo: NULL Date: 12/1/2004 5:25:00 PM Jeff Kish wrote: > On Wed, 01 Dec 2004 14:24:45 +0100, Tjerk Wolterink > <tjerk@w...> wrote: > > >>Terry P wrote: >> >>>Are there any tools (java classes, tag libraries) which can translate >>>xpath statements into a SQL query? >>> >>>Given an xpath query which has a predicate that filters node values or >>>attributes, I want help constructing the Where clause of a SQL >>>statement that will mirror the expressions and functions contained in >>>the predicate. >>> >>>Such a tool may require an XML to DB mapping or it would need to make >>>assumptions about the structure of the document and the tables. >>> >>>Thanks for any advice. >>> >>>Terry >> >>What sory of database are you talking about? >>A ordinary relational database? Or an XML-database. >>Xml-databases are new and not very fast, but there is extensive research in xml-database-system. >>Those system support xpath and xquery as query languages. >> >>I'f you want to map xpath onto sql, then your're right: you need some >>rules about how xml is mapped onto the relational database. >>With those rules you could map xpath expression to sql expressions. >> >>I don't know wether they exists. I myself have my own mapping rules, >>rather simplistic rules but it does the job for me. > > I was under the (mistaken?) assumption that eventually xpath will let you > query multiple data sources, i.e. databases included. > > Is this true? > Jeff Kish XPath is a language to query xml documents, or multiple xml documents, it returns a node-set. It cannot query ordinary relational based databases, i think. But you can query multiple data-sources [multiple xml files, using the document() function]. And maybe in the future you can also query XML-based databases with XPath, But xpath is a rather simple query language for xml, XQuery is much more powerfull. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
