Sunday, September 01, 2002 | |
I can't speak towards Oracle, because the only experience I have with XML Databases is SQL Server (thanks for the empathy), but it seems to me that the bigger danger isn't in placing a burden on the database, it's placing a burden on the DBA. The problem with XML Queries in SQL Server is that it's excruciating to write queries if you care about what your XML looks like (this amounts to a FOR XML EXPLICIT queries chained together with UNION ALL in SQL Server), particularly if you have to work with an existing database structure. Even if you can control the structure of the database, you're dealing with trying to mimic a tree structure in a relational database. If you design your database to accomodate this, remember that databases have other functions, like reporting. This is the same problem as with Object-Relational mapping; you can do it natively, but the end result may be unworkable. I struggled with this for a while and decided to let relational data be relational and do transformations at the point where it's needed. SQL Server does have a nifty facility for exposing XML Queries via HTTP or SOAP, but Greg pointed out the problem here. Exposing your databases directly to a public network is asking for big trouble. There is such a thing as a heirarchical database, and some people have pointed out that these actually pre-date relational technology. Maybe this type of database would work for this application, I have no idea. Later, Justin says:
I'd say that XML is one solution, but there's more than one way to do it. I've been reading The Little Schemer, and it strikes me that one of the very cool things about that language is that code is data. That's a concept that people are coming to (myself included) via XML, especially via XSLT. The point is that we've been here before. One way to go is to use XML as the framework for inventing a new way to get to this concept. The other way is to build on an existing framework. It's usually more expedient to build something special purpose rather than learn the ins and outs of some existing system, but lately my bias has been to try to do the latter. 9:51:04 PM permalink
|