If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Database design and XML

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-29-09, 12:08
ajsica ajsica is offline
Registered User
 
Join Date: Jan 2009
Posts: 1
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?


Al...
Reply With Quote
  #2 (permalink)  
Old 01-29-09, 12:19
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
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
www.chess.com: "sqlblindman"
Reply With Quote
  #3 (permalink)  
Old 01-30-09, 05:38
freeBatjko freeBatjko is offline
Registered User
 
Join Date: Mar 2008
Posts: 89
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:
[Event_Content]
content_ID number
xml_message CLOB
created_on date

[Routing]
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!"
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On