Slashdot Mirror


Sneak Peek at IBM 'Viper' DB2 Release

Rob let us know that Computer Business Review magazine is reporting that IBM is about to add more fuel to the database fire. The company has offered up a sneak peek at their upcoming "Viper" release of their DB2 database. From the article: "DB2 Viper will be distinct from current DB2 database implementations in that it will be able to store XML formatted data inside the database natively--XML support will not be bolted onto the side. Viper will also support relational data stores, of course, and access to those database tables using the SQL programming language."

43 of 181 comments (clear)

  1. "the SQL programming language" by jeroenb · · Score: 5, Funny

    the SQL programming language
    It's a query language. Ffs, the name even says so.

    Although, on second thought, the name also says it's structured.

    1. Re:"the SQL programming language" by n0dalus · · Score: 4, Funny

      It's a query language.

      Yeah. The SQL query language.

    2. Re:"the SQL programming language" by mmkkbb · · Score: 2, Informative

      From an intro on stored procedures:

      "What is a Stored Procedure?
      If a procedure is encapsulated logic that can be invoked from within your application, then a stored procedure is simply a procedure that is stored on the database server. Usually written in SQL, the stored procedure benefits from the power and proximity of the database from which it is managed."

      --
      -mkb
    3. Re:"the SQL programming language" by Vengeance · · Score: 2, Funny

      Correction: The Structured SQL Query Language.

      --
      It was a joke! When you give me that look it was a joke.
    4. Re:"the SQL programming language" by RotateLeftByte · · Score: 2, Informative

      There is a "Standard" (I know this is a dirty word to some) that commonises SQL over a number of platforms.

      Do a google for SQL92.
      DB2 SQL is not a copy of Oracle SQL. There are lots of other database software that is complaint to a standard such as SQL92.

      IBM has extended (another bad word on /.) SQL for use in some other products and called it Extended SQL (Websphere Message Broker). In this incarnation it is a programming language. It does follow SQL92 when accessing databases though. These databases can be Oracle, DB2, SQL/Server or Sybase.

      --
      I'd rather be riding my '63 Triumph T120.
    5. Re:"the SQL programming language" by Ed+Avis · · Score: 4, Interesting

      For those wondering about the difference: a good rule of thumb is that a programming language has recursion, or at least loops. SQL is less powerful than a full programming langauge because there are many things you can test in a program that you can't write an SQL query for. For example, if you have a table of (person, parent) relationships, you can't write a query to list all ancestors of a given person in form (person, ancestor). But you could easily do that given the same data and a general purpose programming language.

      (Actually I think the very latest SQL standard may have some support for recursion to handle queries like this one. I don't know if it is Turing-complete though; I suspect not.)

      Does this mean SQL is bad? No. Partly because it is less powerful than a full programming language, the database can often work out roughly what a given query will need to access and so make an efficient query plan for it. If what you want is expressible as SQL, it's very often a lot faster than coding the same thing in a general-purpose language, and easier to write and understand.

      --
      -- Ed Avis ed@membled.com
    6. Re:"the SQL programming language" by Zemplar · · Score: 4, Funny

      How about GNSQL language?

      GNSQL's Not a Structured Query Language language.

    7. Re:"the SQL programming language" by mmkkbb · · Score: 2, Interesting

      Most database vendors have extended SQL so that it is a full procedural language. Oracle has PL/SQL. MS and Sybase have TSQL. Postgres has plpgsql.

      --
      -mkb
  2. Sneak PEEK by Sexy+Bern · · Score: 4, Informative

    Not "peak". Sheesh!

    1. Re:Sneak PEEK by Anonymous Coward · · Score: 2, Funny

      Give him a break. At least this time he read it through and checked if it had been posted before!:)

    2. Re:Sneak PEEK by peetola · · Score: 5, Funny

      I had a sneak peak once in high school. Very embarrasing.

  3. Re:XML database by Oscaro · · Score: 3, Insightful

    Talking about native XML databases... My company can't find a decent one, preferably open source.

    That's probably because an XML database is NOT a decent idea. XML is NOT meant to be used as a way to store data! Rather, it's a way to communicate data between entities.

    Sadly, XML is a one of those words that have the magic power to make marketing people happy. So they put it everywhere. If that doesn't work, they just put more.

  4. Re:XML database by Daniel+Dvorkin · · Score: 2, Insightful

    There aren't any. XML databases are a dumb idea, and they will never perform as well as regular relational databases. The best thing you can do is store your data the regular way, and use an application layer to read and write XML as needed.

    --
    The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
  5. Re:Oracle by bLanark · · Score: 5, Informative

    Oracle's had this for years. Since v 8, I think? (corrections welcome)

    Glad to oblige ;-)

    Oracle basically chucks it's XML into a LOB, and you can search the lob for strings, etc.
    What IBM has actually breaks down the XML, creating a tree structure behind the scenes. There may be no out-and-out benefits at the moment, but the solution is a much better implementation than Oracle. The applications will come.

    Visit here and have a look at the paper "An Overview of Native XML Support in DB2". Also maybe see "Learn how IBMs new XML technology differs from other XML storage", which is a link to a Register article.

    --
    Note to ACs: I won't mod you up, even if you are being funny or insightful. So take a chance! It's not real life!
  6. Technology Pot Pie by borkus · · Score: 4, Informative

    Back when IBM bought Lotus, Notes was a very unique platform for document databases. I wonder if they've taken the old Notes document database concept and exapanded it to XML. IBM owns so much esoteric intellectual property; you would hope they could find some interesting overlaps.

    As IBM indicates in their press release, they're making sure it integrates with PHP as well.

    BTW, the register has some good coverage on the new XML integration.

    1. Re:Technology Pot Pie by Greyfox · · Score: 2, Insightful
      Unique isn't the word I'd use to describe anything about Lotus Notes. Sucktastic, maybe... Sure they've managed to kludge Notes to do a few somewhat interesting things, but those things can not offset the underlying sucktasticness of Notes. IBM knows the product sucks too. Every single IBMer that I've ever talked to hates Notes. They hate it from the bottom of their hearts. They hate it in the way they would hate someone who killed their family and kicked their dog. The only reason IBM keeps them around and forces all their employees to use Notes is that they have to justify the purchase of Lotus for 6 BILLION DOLLARS.

      Every so often a company other than IBM will try Lotus Notes. I've encountered a couple of them over the course of my career. Interest quickly devolves into the deep kind of loathing that I describe here. That usually results into a quick move (back) to MS Exchange server.

      I keep hoping that IBM will give up on Lotus Notes and kill that atrocity, just like they killed Smartsuite and OS/2. Unfortunately they seem bound and determined to get some value for their 6 BILLION DOLLARS, even if it means saddling every employee in the company with the worst E-Mail client on the planet.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    2. Re:Technology Pot Pie by FooAtWFU · · Score: 2, Informative
      Actually, their next version of Notes (code-name 'Hannover' if I recall correctly) will be more or less completely rewritten using SWT.

      That said, Notes is a pretty ugly email client. But it's more than an ugly email client. It's a distributed database replication application, not entirely unlike, say, Access, except a dead dog is a better database than Access. Notes just-so-happens happens to use one of those databases for email. And there's probably way too much stuff in the other, non-mail databases at IBM to make a switch possible.

      --
      The World Wide Web is dying. Soon, we shall have only the Internet.
    3. Re:Technology Pot Pie by tigersha · · Score: 2, Informative

      Yeah, I am saddled with a Notes atrocity at work (not for long though, they screw with me one more time...) and it truly, utterly sucks. With Notes the development environment sucks. Truly, totally and beyond belief. You cannot even search your own goddamn codebase for a string. THe API is a very much cobbled-together affair where you get the dintinct idea that they put on some arbitrary API call just to make some hot customer happy. Some things have little logic to them.

      The database itself is not that bad, for what it is supposed to be used. But some people implement relational stuff in Notes (yes boss, I am talking to you), and this is deadly, deadly, deadly. Notes is a document based database that stores documents with random fields, and the fields have no structure. For many things this is OK. For things with connections between documents this is not OK.

      Notes is a fine document store and OKish to quickly bring up a quick website for use by something. It is also Okish when it comes to dealing with groupware-related stuff. The UI of the mail client sucks bad but the underlying idea of implementing the Mailstore as a document databse definitely has its plus points. It makes some kinds of mail management tasks (member newsletters and tracking of bad mail addresses) quite easy.

      On the plus side, it slao does things like remote calling (through Corba and Java) very easy and it has a very good implementation built into the entire system of PKI. Notes also can replicate and communicate through a pice of wire connected the Joytick port. It is very reliable in that way. The replication of data is very good, UNLESS there is a conflict, in which case it sucks, sucks sucks. Please people, can I PLEASE KNOW WHICH GODDAMN FIELD CAUSED THE PROBLEM???

      But in the name of all that is holy, I hope they improve the stupid godawful horrifyingly bad development environment. Not that I care, I will be leaving my Notes nightmare rather soon.

      --
      The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
  7. I am the viper... by pulse2600 · · Score: 5, Funny

    I am the vinder viper!!!! I vill be there in three months!!! I come to vipe your vindows!!!

  8. Late to the party by cyberjessy · · Score: 3, Insightful

    IBM reckons that the addition of native XML support will expand the $7.8bn relational database market by another $1.4bn. And IBM wants to get the bulk of that additional XML-related revenue for databases.

    Sql support has been on the most wanted list for most companies for quite some time now. With Web Services being used everywhere, and most data formats going XML, representing all those in old-style tabular form and querying them is such a pain. Now, Sql Server 2005 and Oracle have excellent Xml support right now, not next year. Which means IBM, you are late. The deperate switchers are already switching (I know many who did to MSSQL 2005). And many for whom it is desirable have been playing around with it for atleast a year now. By the time Viper is done, they would already be running some database which supports Xml.

    Which not only means that you would get very little of the Xml pie, but also that you will have to work real hard to make sure your existing customers don't move to Oracle or MS, because they want Xml support much earlier.

    --
    Life is just a conviction.
    1. Re:Late to the party by kpharmer · · Score: 2, Informative

      > Now, Sql Server 2005 and Oracle have excellent Xml support right now, not next year. Which means IBM, you are late.

      That's incorrect - DB2 has supported XML for probably two years now. What they're rolling out is a database engine that has much improved support for XML. Prior to Viper the existing database engine would convert the xml to/from tabular format within the database.

      Now, what's the value? Well, this should allow more functionality and flexibility for XML queries, and should also allow for queries against XML data to also include non-XML data.

  9. Re:So? by emamousette · · Score: 3, Insightful

    If you've been running these databases successfully, you're probably spending a lot of time writing and maintaining code to handle ACID issues, locking, and other headaches.
    Why not pay someone else to do that kind of work?

    [And yes, you can donate to PostgreSQL development!]

  10. It sure is! by brunes69 · · Score: 3, Funny

    Sql support has been on the most wanted list for most companies for quite some time now.

    Indeed, SQL support is often the first thing I look for when shopping for a database.

  11. Re:Oracle by bj_rmz · · Score: 5, Informative

    The strange thing about this development is that the navigation model used by XML is essentially
    the old "network" model used by among other CODASYL in the early seventies. This model
    became unfashionable when the relational model gained popularity, but seems to be quite fashionable
    when it is wrapped in XML syntax :-)

  12. IBM answers MS by Decker-Mage · · Score: 3, Interesting
    So now we know IBM's answer to SQL Server 2005. Both now have native XML support with XQuery, both do stored procedures although SQL Server has for some time. What's interesting is that db2 can have the Zend core bolted on as the equivalent of .NET and that db2 does very nice document store handling but that's always been a selling point for a while now. I really like the notion of using it for a document store.

    I wonder what the price point for Viper is going to be in comparison. I already know what it is for the various versions of SQL Server 2005. Ouch! I'm waiting for my Enterprise and Developer versions to show up now so I can play more (I've been playing with the betas for a long time now as I do DBE work as well).

    --
    "[I]t is a wise man who admits the limits of his knowledge or skill, and that pretending either causes harm." --Terry Go
    1. Re:IBM answers MS by kpharmer · · Score: 2, Informative

      > Both now have native XML support with XQuery, both do stored procedures
      > although SQL Server has for some time.

      So has DB2 - though SQL Server stored procedures (inherited from Sybase) are the easiest to work with in the industry. And have almost no exception handling, though perhaps (I doubt) they've improved this in 2005.

      > What's interesting is that db2 can have the Zend core bolted on as the equivalent of .NET and that db2 does
      > very nice document store handling but that's always been a selling point for a while now. I really like the notion
      > of using it for a document store.

      DB2 is very focused on this, with entire sets of add-on products for content management. Never used them, no idea how good they are or how expensive though.

      > I wonder what the price point for Viper is going to be in comparison. I already know what it is for the
      > various versions of SQL Server 2005. Ouch!

      Note that db2 will now have two database engines: the xml engine, and the relational engine. Both are getting upgraded in Viper. The relational engine is picking up:
        - Oracle-style partitioning (to add to its own three other types)
        - Label-based access controls (to handle more complex security requirements)
        - adaptive self-tuning memory (to automatically configure itself)

      I've got no idea how they plan to price the XML engine within Viper. But I'm asuming that the existing database engine will be priced similarly to how it is priced today.

      For example, the top-end db2 product costs $32k/CPU, with some potential add-ones if you want spatial analysis or whatever. Oracle is $50k/CPU and the add-ons tend to be much more critical ($10k/CPU for partitioning, etc). SQL Server's top end product is now $25k/CPU. These are all list prices - and subject to huge discounts.

      But of the three DB2 includes a lot more in their base product - so you can actually use the lowest-end products at about $1000/*server* and still get a partitioning solution that can handle a terabyte data warehouse. Or $7.5k/CPU and out-perform the SQL Server database at $25k/CPU on warehousing & reporting apps.

      SQL Server is getting a lot of press on their analysis services and new reporting services features. DB2 partners with essbase for olap engine equiv to analysis services. I think this would also be an equiv to reporting services, but I haven't yet seen a good detailed description of exactly what that is. It looks like little more than crystal reports or brio from what I've seen so far. If that's the case then there's little there of real value. Still, it's obvious that db2 & oracle both need to shore up this area of functionality.

  13. Re:XML database by CrankinOut · · Score: 2, Insightful

    As I recall, that's the same sentiment expressed about relational databases when the current state of the art was hierarchical and CODASYL databases in the 70's. All it takes is one really good implementation of the new idea to change this perception.

    There were huge debates about the "abstract model" of a relational database that didn't make sense in The REAL WORLD (TRW), because "real" problems were more complex than the relational model and performance would suffer.

    I don't know that an XML database is "better", but then again, I don't know that it isn't. Maybe I'll learn something!

  14. Re:XML database by Oscaro · · Score: 2, Informative

    We develop documentation (manual, onlinehelp, etc.) and develop our content modular in XML, and publish it to different output formats (PDF, HTML, CHM, etc). In this case XML is an excellent format for storing content.

    Ops, of course I should have been more clear. What I meant is that I don't think XML is meant (IMHO) to be used to store MASSIVE amounts of the kind of data you USUALLY store on a DB.

    While it can be extremely useful to use XML to represent the data you just extracted from the DB (or the data you are about to insert), saying "we store data as XML natively" sounds to me just a silly marketing campaign.

  15. Re:Oracle by stephenbooth · · Score: 3, Insightful

    Oracle has stored XML data in a tree structure and allowed querying via XQuery since version 9.

    Stephen

    --
    "Don't write down to your readers, the only people less intelligent than you can't read" - Sign on Newspaper Office Wall
  16. Usefulness? by CodeShark · · Score: 3, Interesting
    Not sure, but from where I sit, the ability to store XML natively is one of those "nice but not absolutely necessary" things you can do with a dbms. (database management system), because any of the current RDBMs can store XML chunks in {text fields, memo fields, C-LOBS}, etc. and I have been doing stuff like that since my days as a Clipper/Foxpro/xBase programmer. [aged myself right there, didn't I? :-) ]

    So it's not the storage that counts, it is the ability to extract useful information from the text field/clob without requiring a great amount of processing overhead. Which is where I wonder how useful this is except in situations where there is very little post-processing or querying to be done against the XML. For example, if I am always just going to render the XML or pass it along without any post-processing. Even then, in terms of processor time, etc. it just isn't that hard to write good code to pull the data from a regular SQL database, output it as XML, etc. thus gaining gain all of the other advantages that a modern dbms has over flat file storage without imposing the dreadful data overhead required for all of the xml tags, etc.

    Am I missing something?

    --
    ...Open Source isn't the only answer -- but it's almost always a better value than the alternatives...
  17. SQL support!? Are you sure? by Anonymous Coward · · Score: 4, Funny

    Viper will also support relational data stores, of course, and access to those database tables using the SQL programming language.

    Thank you Captain Obvious! Until I read the headline on slashdot, I was concerned the new DB2 might not support SQL queries. Now I can sleep tonight.

    On a radical tangent, I was thinking of buying a new car. Has anyone heard if the new cars from GM have wheels that turn? I'm not sure because it doesn't say on the website anywhere. I really hope the new cars have wheels that turn. If the wheels didn't turn... that'd be like a database without SQL... or something.

  18. Re:XML database by Randolpho · · Score: 2, Informative

    XML is neither a means of storing data, nor a means of communicating data, but is only a means of *marking up* data.

    --
    "Times have not become more violent. They have just become more televised."
    -Marilyn Manson
  19. Re:It still sucks by kpharmer · · Score: 5, Informative

    > It still sucks for real time applications. DB2 is a good warehouse DB, good for batch processes and such.

    The differences between oracle & db2 for transactional apps are mostly:
    - db2 is about 1/3rd the cost of oracle
    - db2 is faster
    - db2 includes some warehousing features (range-partitioning via MDC) for free which are often also useful in these applications
    - db2 is simpler to administer
    - oracle has a locking interface that's easier to use (MVC instead of row-locks)
    - db2 likes to use static sql that requires binds (pita, but optional)

    > I must admit those IBM guys know how to butter the sales to the management with all those golf subscriptions,
    > hockey tickets what have you.

    Hmmm, i've worked with sales staff from quite a few different companies. But I've never worked with people as nasty as at oracle. They go *way* beyond mere buttering up of management all the way to stabbing the technical staff in the back when the want their professional services team to get their work, or when the oracle product fails to deliver the labor savings that sales promised. Oh, and then there's the famous oracle trick of leaving vital pieces of the product out of the discounted original deal, and slaying the customer when they discover that these are required...

  20. MSSQL by sgent · · Score: 2, Insightful
    DB2 and Oracle will always be better than SQL Server for one reason -- as of now, they are the only one's who can effectively scale.

    For processor intensive searches, you have the option to throw hardware at the problem, moving up into RISC and mainframe platform's if needed.

  21. Re:So? by Anonymous Coward · · Score: 2, Insightful

    1 gig? Major database? BWAHAHAHAHAHAHA!

  22. XML Database, Good or Bad by awol · · Score: 3, Interesting

    I think that all the folk saying that "XML is bad for databases" are dismissing it far to quickly. Let us think about the general case of "marked up" data being included in a database.

    First, is there a difference between doing this in a relational database versus another kind (say object DB). Perhaps so, but I wish to focus on RDBMS since it is the one that is on topic here and the one that seems so counterintuitve.

    Marked up data (XML, HTML, perhaps even SGML) consists of field values _and_ the schema of the fields themselves (even if not always the base data type). Whilst it may be necessary to have the grammar to be certain about the full domain of the *ML there is enough in the marked up data to construct a record from the input data. Think about it, this means that each record arriving at the database contains some information about the schema of the record as well as the data itself.

    A database that took this *ML and integrated it natively would, in my world allow the user to create tables with an indeterminate number of fields that could vary from record to record whilst still allowing normal RDBMS functionality.

    The complexity of such an implementation would be high, particularly within the context of a database that still has good indexing, table management and performance. Foreign keys would be an intriguing challenge. There is nothing about the problem that is inherently unsolvable but performance would be a real challenge.

    I don't think that this functionality is a category killer. But I can imagine why some people love the idea. Lots of people would like to be able to define records in their RDBMS that have arbitrary fields that the designer of the schema did not know about when the database was built. SQL does not cope with this scenario at all. However in my view correct normalisation solves most of these issues and makes the need for native XML unnecessary. Perhaps it would have been easier for IBM to ship DB2 with a copy of McGovern and Date.

    --
    "The first thing to do when you find yourself in a hole is stop digging."
    1. Re:XML Database, Good or Bad by kpharmer · · Score: 2, Insightful

      > I don't think that this functionality is a category killer. But I can imagine why some people love the idea.
      > Lots of people would like to be able to define records in their RDBMS that have arbitrary fields that the
      > designer of the schema did not know about when the database was built. SQL does not cope with this scenario at all.

      Well, relational databases can handle this situation - you just have to avoid relational *modeling* within the database. And the challenge you get into at that point is that you lose some valuable features such as foreign key support, etc. But it is doable, just performs slowly and is labor-intensive to create. Still, it has its place.

      > However in my view correct normalisation solves most of these issues and makes
      > the need for native XML unnecessary.

      Hmmm, not sure about that. Dynamic models weren't really an issue thirty years ago when Codd was coming up with these ideas: business changed much more slowly. Today we're changing business rules so quickly - and expect to modify major systems in the blink of an eye. As mentioned above, we can support this using relational systems, but we end up heading away from normalization, not towards it.

      > The complexity of such an implementation would be high, particularly within the context of a
      > database that still has good indexing, table management and performance. Foreign keys would
      > be an intriguing challenge. There is nothing about the problem that is inherently unsolvable but performance would be a real challenge.

      Until people determine what the 'best practices' are for such a database they can get into trouble with it: how do you convert the data when the application changes? Is it easy as it is today with relational databases? Or do you have to write entire data conversion apps (like you did with hierarchical databases twenty years ago). How do you design & tune for performance? How do you handle data quality? Well, it will probably be best to start with some very small projects ;-)

    2. Re:XML Database, Good or Bad by kpharmer · · Score: 3, Insightful

      > So for more agility in your database designs, you endorse LESS normalization? I can't imagine a less normalized
      > databse every being more agile than a properly normalized one. Either I'm missing what you mean by dynamic
      > model, or you don't understand the benefits normalization.

      Right - i'm not talking about 'denormalization' - in the way that you would denormalize a modeling to simplify sql and improve performance on a reporting application. I'm talking about not applying that set of database modeling rules at all.

      > You do know one of the main goals of the relational model was to allow agility right?

      Yep, and it has done that well: relational databases are far more agile than the hierarchical ones that preceded them. But - they aren't agile enough for some problems.

      For example, lets say that you have a bicycle-shop-management application that you sell to small shops. You sell it for, what? $5,000 plus 18% annual maintenance. It handles bicycle inventory, sales, some light marketing, etc. Well, one day one of your customers decides to sell books about bicycles. Well, perhaps you've got a generic inventory table that he can describe things in - but if you've got a 3-5NF model - it isn't that generic. There are no columns specific to books in it. And he really can't afford to spend $10-50k on an update to support that.

      So, ideally you've got a model in which some attributes of items are kept in key-value pair tables. This isn't wonderful for a lot of reasons - but it does give the application owner the ability to define new kinds of attributes that were unforseen by the dba. And, if done well, he can even define (in the database) rules for when some of these attributes are required, what their domain is, what their type is, what their default is, etc. These "dynamic attributes" would give the user the ability to create whatever new columns they want to describe the entity "book".

      Additionally, you could design the model to support the concept of "dynamic entities": in which concepts such as book, bike, helmet, wrench, tire can be logical subtypes of inventory item. Not just identified through a single simple tag - these concepts can be related through many-to-many relationships to one another, to multiple stores, to customers, etc. The relationships between these entities can be dated, prioritized, weighted, and the entities can inherit from multiple parents in this case. Now when the store owner wants to add the concept of book they can *easily* also create overlapping sub-categories below it (mountain biking, road biking, family biking, competitive biking, history, etc) - and then relate these items to other inventory items that share that category. End result - you click on the bike shop's web site and look at a heading called "winter biking" - and see everything remotely related to this concept. And - it was easy to set up, and there's nothing specific to "winter biking" in the structure of the data.

      Sort of similar to what the topic maps community is trying to do with XML:
          http://www.topicmaps.org/

      Though in my opinion they are only shooting for a subset of what we should be trying to do at this time, and what we can do via relational databases or whatever. Still, with strong db2 support for topic maps that may be the easiest way to go for now.

    3. Re:XML Database, Good or Bad by johnjaydk · · Score: 2, Interesting
      Perhaps it would have been easier for IBM to ship DB2 with a copy of McGovern and Date.

      I had the distinct pleasure to discuss exactly this topic with Date yesterday. Yes, that Date. To say that he's not pleased with the idea of XML in databases would be a very british understatement. In his words "it's a throwback to the hieracical database model, that has already been proven defect once and for all".

      On top of that I would like to add that it's extremely rare that one encounters an international celebrity within the academic environment that is such a nice person.

      --
      TCAP-Abort
  23. Re:Oracle by Anonymous Coward · · Score: 3, Interesting

    Oracle basically chucks it's XML into a LOB

    How *else* do you store a value from a type in a database?

    How does Oracle store integers? "Uhh, that's different" I hear you mumble. No, it's not. An XML document and the associated tree representation is a *value*, an instance of an *XML data type*, with associated operators (xpath, text search, update, etc). So it goes into an attribute (column).

    Go back and review your relational theory (that advice applies to 99.99% of users and vendors unfortunately).

    If Oracle's marketing has convinced you of something different, then that's their marketing department's fault. The exact implementation (how the XML tree is stored) and syntax (how you query it) is irrelevant. The relational model, and classical type theory (which predates the RM) already tells you how to think logically and abstractly about any data storage and manipulation task, without regard to the peculiarity of any particular product.

    For a more concrete example, not using the syntax of any particular product:

    EMPLOYEE_DETAIL = (EMPLOYEE# employee#, XML_DOCUMENT resume, JPEG_IMAGE mugshot),
    PRIMARY KEY EMPLOYEE_DETAIL employee#,
    KEY XPATH(resume, '/employee/@id'), -- they should be unique and indexed
    ASSERT IS_VALID_XML(resume, 'whatever.dtd'),
    ASSERT XPATH(resume, '/employee/@id') = employee#,
    ASSERT IMAGE_SIZE(mugshot) < (512, 512) AND IMAGE_SIZE(mugshot) > (128, 128);

    -- find all employees that listed more than 5 skills and whose last name begins with "Smit"
    SELECT EMPLOYEE_DETAIL
    WHERE XPATH(resume, 'count(/employee/skills/skill) > 5')
    AND XPATH(resume, '/employee/first_name') LIKE 'Smit%';

    Of course, this needs a cup and a half of syntactic sugar to make it more pleasant when using XML-heavy applications (for instance, XPath could be embedded a little more gracefully), but surely you can see that all XML databases can reduce to the same model. Those that are created with ignorance of the relational model won't be as useful.

    A well-designed relational database would already be an XML (hierarchic) database, and would already be an object (network) database, because those are both less general than the RM (entities related by arbitrary assertions).

    One problem with today's SQL products (and they have MANY) is that you can't create your own types easily. You should be able to add XML support, object support, or whatever else, as easily as you can with a general-purpose programming language. You shouldn't have to wait for the vendor to "add" it.

    Imagine if you had to *wait for a new release* to get XML support in Java or Perl. Yeesh. Yet database users seem perfectly content to suck down the crap from the vendors. They don't know what to ask for or how to evaluate what they get. Even though this was mostly figured out 30 years ago.

  24. Re:Excellent by soosterh · · Score: 2, Insightful

    Actually the pricing of DB2 is quite resonable -- especially for the express version.

    <flame suit on>

    The other issue is that many companies using products such as MySql have to re-implement features that are standard in other systems. Features such as robust replication, clustering, etc also are just coming on line for MySql and Postgres, but have been part of DB2 and friends for years.

    <flame suit off>
  25. XML Query and XML in databases by Ankh · · Score: 3, Insightful

    A few people have asked whether DB2 is going to support XQuery, or said that it won't, or that putting XML in databases is stupid, or that there are no advantages to having XML in relational databases.

    The IBM article does say that their Viper product will support XML Query (it's also known as XQuery).

    So yes, looks like they will be supporting XML Query.

    Is it a good thing? Some pretty smart people seem to think it's a good idea, so maybe it's worth at least taking the time to listen to them.

    If the only XML you've dealt with is the result of marking up relational tables, you might not see much advantage.

    If you have a lot of XML documents, though (say, five million) that all validate to an XML Schema, you know some things about them. You might know, for example, that all of the price elements contain numbers. You might know that the description elements may contain embedded partnumber elements intermixed with the text, and that those partnumber elements contain part numbers formatted a particular way.

    A database can build an index based on this sort of information, and can do very efficient searches and "joins".

    You might also think about what you could do if you had all of the XHTML documents from some major Web site (perhaps an Intranet corporate site, or maybe your own personal site) stored in a database in such a way that you could easily make different views of the information.

    I think the real niche for XQuery might be as middleware: the ability to run queries against multiple databases, whether XML or relational or flat file or whatever, without caring about how the data is stored, can be very interesting, not to say useful.

    ISO SQL has also standardised on how to map between SQL and XML Query data types, and on how to evaluate XML Query expressions embedded in SQL expressions. The Java Community Process has been working on XQJ, a way to reach out to XQuery data stores from within Java.

    The XML Query Home Page (disclaimer: I maintain this) lists some 45 implementations, both proprietary and open source. Not all of these are complete, but, as others have noted here, XML Query is a W3C Candidate Recommendation: we're asking for public feedback from implementors, and trying to make sure that the specification is clear and precise enough that implementations all work the same way.

    I think XML Query support in SQL databases is likely to become pretty widespread. Until it is, you can also use some open source implementations that support JDBC, as well as one or other of the commercial implementations that support query optimisation over external SQL-based data stores.

    --
    Live barefoot!
    free engravings/woodcuts
  26. 10gr2 can store it native by Stu+Charlton · · Score: 2, Informative

    You can store XML according to a schema, and index it using B*Trees, or you can store it as a LOB and index it with function-based indexes or text indexes. There are tradeoffs to either. Here's a document explaining Oracle's implementation, though you need to sign up to OTN (free reg)

    http://download-west.oracle.com/docs/cd/B14117_01/ appdev.101/b10790/xdb01int.htm#sthref46

    --
    -Stu