Re: [Zsqlml-users] some questions about coding zsqml selects
Status: Alpha
Brought to you by:
ageissel
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." |