3 ms·
The problem is that for a while there, XML was hot hot hot and so DB vendors added "XML support!" as a tickbox feature. There's a case to be made that, by stor
by jacques_chester 15y ago
The problem is that for a while there, XML was hot hot hot and so DB vendors added "XML support!" as a tickbox feature.
There's a case to be made that, by storing XML documents in a field, you've managed to violate first normal form. And it's generally downhill from there.
- dmitriy_ko 15y agoExactly! So you are going to store data as XML blob, and then use XPath to query it. You get to use XPath, how cool is that! I'm sure there are cases when storing XML documents in DB is useful -- e.g. if you need to store a complex document structure of which you don't know ahead of time. But the example they provided -- storing beer info is exactly the wrong case do it.
- jacques_chester 15y ago> So you are going to store data as XML blob, and then use XPath to query it. You get to use XPath, how cool is that! I think you've missed my point. Storing XML in a field defeats normalisation and the benefits flowing there from. Being able to query it with XPath just doubles the number of query languages that I will need to know and keep track of in the database. If you want to store XML blobs, use the file system and XPath to your heart's content.
- dmitriy_ko 15y agoI did get your point. I was being sarcastic when I said that using XPath is "cool." I guess should've marked it with <sarcasm></sarcasm> to make it clear ;). I was trying to convey exactly what you just said: it doesn't make sense to use XPath to query relational DB.
- jacques_chester 15y agoMy mistake then.