Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2009

    Database design and XML

    I work as a consultant and have been in a number of different shops over the years. I have noticed in recent years, with the advent of the xml data type that some projects have incorporated a database design that has sort of devolved into something like :
    [id] [int],
    [data] [xml]

    Then resorting to horrendous looking XQuery statements to access the data.
    To me, this type of database schema approaches something of a code smell.

    Has anybody else come across designs such as this?
    Has anybody come across some good articles or references on how to incorporate a judicious use of this potentially dangerous data type?

    It seems to me most vendors are busy touting how wonderful and powerful
    their support for XML is, instead of providing guidence on how to maintain
    a proper relational design while using this data type.

    Is Codd turning over in his grave yet?


  2. #2
    Join Date
    Jun 2003
    Fortunately, no I have not actually come across that yet. It is still just something we joke about.
    If it's not practically useful, then it's practically useless.

    blindman "sqlblindman"

  3. #3
    Join Date
    Mar 2008
    Actually I have.
    We have a design that supports replication of system events throughout the topology, and even worse: They use xmltype data, but in a CLOB column!
    Basically, it looks like this (Oracle):

    2 tables:
    content_ID number
    xml_message CLOB
    created_on date

    routing_id number
    destination number
    (among others)

    So they are just sending the xmltype message through the system that way,
    but all the information like what's the type of the event/message, is inside of that xml, not as a separate column!

    That means if I ever wanted to track down a particular event I have to search through each one of hundreds of thousands of these CLOB fields, using xmltype decoding functions to get the info I need.

    I hate the developer team that came up with that.
    "My brain is just no good at being a relational Database - my relations suck real bad!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts