zsqlml-users Mailing List for Zenark's XML for SQL
Status: Alpha
Brought to you by:
ageissel
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: 120313149 <120...@sm...> - 2003-04-16 07:12:49
|
Hello! You have received a postcard. You can see it here: http://postcards.rin.ru/postcards/post/humour1.html Only for adults: SEX-TEST - http://eros.rin.ru/index_e.html and WALLPAPERS - http://wallpapers.rin.ru/index_e.html For music-lovers: Free 100 000 mp3-files - http://mp3.rin.ru/index_e.html And for all: Surprise! - http://humor.rin.ru/photo_e.html Goodby, Gerry. You can refuse to receive letters. For that just send a letter to unsubscribe14.com with the subject: DELETE. |
From: Matthew L. <lei...@ma...> - 2002-07-26 21:13:45
|
Dear Adrian, Thanks for your reply. Let me explain where I'm coming from, too. There are lots of plug-and-play database-driven web applications. Take two, like phpslash and bugzilla. Each of them have their separate databases with some kind of user/password table. What if you wanted them to use the SAME user and password information? One way is to go in and rewrite all the queries, but that's going to take a while. What if you can write functions that will break up the query and rewrite them intelligently based on specified rules? So if bugzilla wants "user_id" of the table "users" in the database "bugs", and we want to instead query "author_id" of the table "psl_authors" in the database "phpslash", then we could write a rule for that. I'm not a professional programmer, but it seems like a possible way to do this is to use regexps to break up the SQL into some kind of XML, use XSLT to apply your integration rules, convert it back to SQL and only then give it to the database server. I guess there are some performance issues with that, but it seems to me to be feasible and not too hard to apply. You wouldn't have to change much code, just write the stylesheet. So I looked for an XML method to write SQL statements and the one included in zsqlml was the first one that looked well thought out. It did seem more designed for database creation and population than for querying, but I was hoping that that could be extended, and I'm glad you think so. One thing that I wonder about is that so many attributes are of type ID...so you can't have a column of a table of a database with all the same name, right? MySQL allows you to reference columns by dbname.tablename.colname, and you can select and even compare across multiple databases. I don't know if this is supported in other RDBMSs, or if it conforms to any SQL standard. I don't know much java at all...my background is PHP, Perl, and a tiny bit of C. But I'll take a look at the stylesheets you've written and see if it can be ported to mysql. You're probably right that it shouldn't be hard. Take care. --Matthew Leingang -- ---------------------------------------------------------------- Matthew Leingang http://www.math.rutgers.edu/ Rutgers University lei...@ma... Department of Mathematics "This signature needs no quote." |
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 |
From: Matthew L. <lei...@ma...> - 2002-07-26 16:26:33
|
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." |