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."

7 of 181 comments (clear)

  1. 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
  2. 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...
  3. 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
  4. 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 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
  5. 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
  6. 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.