Re: [Zsqlml-users] some questions about coding zsqml selects
Status: Alpha
Brought to you by:
ageissel
From: Adrian G. <age...@ei...> - 2002-07-26 20:31:25
|
Hi Mathew, To begin the answer to your question, I should explain the initial context for developing the zsqlml DTD. I wanted to define the structure of a RDBMS independently of SQL - a little like UML abstracts C++ / Java (I know that this is a simplistic analogy - please forgive:). Therefore the DTD defines the structural elements, and provides a means for converting this structure into vendor-specific SQL variants through its XSLT stylesheets. As I understand it, you wish to use the zsqlml DTD to build the SELECT query. This is possible, but todate, the <zsql:select/> tag supports only a subset of possibility - it was included to support the definition of VIEWs. I guess that the DTD could be ammended to extend the meaning of <zsql:command/> to allow for sub-element processing, specifically <zsql:field/>'s in your example. This is not a big deal. The second question, encoding of the WHERE statement, appears to be correct. To check, run your zsqlml script through the transformer and inspect the resultant SQL. Your third question relates to joining data across multiple databases - can this be supported by the database server? Ultimately, the zsqlml is transformed into SQL, so if its in SQL, it can be defined in zsqlml. So, to wrap up, I think that zsqlml can be used for your task, with a couple of minor tweaks. Work has me busy at the present, but I'll see if I can make the time. I'd obviously really appreciate help with the MySQL generator - it should / could be a simple edit on the existing pgsql XSLT;) Regards, and thanks for expressing an interest in zsqlml Adrian Matthew Leingang <lei...@ma...> Sent by: zsq...@li... 26/07/2002 17:26 Please respond to Matthew Leingang To: <zsq...@li...> cc: Subject: [Zsqlml-users] some questions about coding zsqml selects Hi, I just downloaded zsqml because I'm looking for an SQL DTD to join some database applications via XML. The only database I'm interested in is MySQL, which you don't support yet, but I might be able to help you with that. Say I'm interested in writing the following in zsqlml: SELECT user.id, CONCAT(person.firstname, ' ', person.lastname) FROM person, user WHERE person.user_id = user.id I'm not sure how to code the CONCAT function. I assume the WHERE clause would go something like <zsql:where> <zsql:eq> <zsql:field table="person" column="user_id"/> <zsql:field table="user" column="id"/> </zsql:eq> </zsql:where> But I'm not sure. The next question: Can I use zsqlml to join fields from different databases? That doesn't seem to be the case. Thanks for any help. --Matthew Leingang -- ---------------------------------------------------------------- Matthew Leingang http://www.math.rutgers.edu/ Rutgers University lei...@ma... Department of Mathematics "This signature needs no quote." ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Zsqlml-users mailing list Zsq...@li... https://lists.sourceforge.net/lists/listinfo/zsqlml-users |