Skip to content

is it bad practice to store xml in database?

It’s a sql server database

91 Comments

  1. Ratchetr wrote:

    I agree with the 2 previous answers.
    I think the real answer is: it depends. What are you going to DO with the data in the future?

    Are you going to dig up one of these XML records once a month to satisfy some reporting requirement, or are 20 people a day going to be doing something that requires that you find all the XML records with first name XYZ and DOB before 1990?
    In the first case, yeah, XML is fine and easy.
    In the second case, NO!!! You want to do that slice and dice with SQL.

    Your case probably falls in between. If it isn’t clear cut, I would err on the side of not storing XML. Might be more work up front, but you’ll have an easier time meeting future requirements for slicing and dicing the data.

    Monday, February 8, 2010 at 9:23 pm | Permalink
  2. two pi wrote:

    It’s not necessary. The database is already a mechanism for handling data. A relational database like SQL server has a very optimized mechanism for storing and manipulating data.

    XML is most useful for transferring data. You can have your database program export a database or query result as XML, and then even a language without direct data access (like JavaScript) can manipulate it.

    Monday, February 8, 2010 at 9:23 pm | Permalink
  3. J wrote:

    You can store whatever you like in a database. That’s what they are for. More important is how you index it, combine it was other tables, and arrange the data or choose the database to suit the kind of performance you need. Some databases are optimized to read quickly and as a side effect often update slowly (DNS is a good example), and others are more suited to data that changes quickly.

    Monday, February 8, 2010 at 9:23 pm | Permalink
  4. WillyD wrote:

    I think it is pretty bold for me to assume that I know the reason you have decided to store xml in a database. It being bad practice or not depends on why you have chosen to do it and what your alternatives are… where the data needs to go, what it holds, and how complex the structure is.

    If your structure is complex and the xml you are storing doesn’t have a consistant structure, then maybe you do want to just store it as is in a database.

    If your structure is consistant and simple, it might make more sense to disasemble the xml and dump the data into a similarly formatted table, and then re-assemble it into xml once you’re ready to transport the data. It will save you overhead.

    Those are my thoughts.

    Monday, February 8, 2010 at 9:23 pm | Permalink
  5. Super J Dynamite wrote:

    Bad practice from a database design standpoint, or bad practice from a database engine performance standpoint?

    I suppose the answer to the performance issue depends on the database engine. Most relational engines have a fixed page size (in SQL Server it’s 8k) and if you want to store a document longer than that you’ll have to use a have to use an arbitrary length column type like NTEXT. Typically the arbitrary length fields store actual data outside of the database (pretty much as individual files on disk). Getting these files connected to the rest of the row data when selecting can be a performance issue.

    Starting with SQL Server 2000 there was some support for XML (such as returning data as XML) but overall the extensions for working with XML were a big letdown. Native XML support has improved with SQL 2005 and 2008, but I haven’t revisited it after my experience with 2000.

    Monday, February 8, 2010 at 9:23 pm | Permalink
  6. TheMadProfessor wrote:

    Like several others stated, it depends a lot on what you plan to do with it. If you simply need the data in XML format for porting somewhere, you can always run a SQL query to create a subtable, then export that table in XML format.

    Monday, February 8, 2010 at 9:23 pm | Permalink
  7. Just informing you that I really like your web site, and I come here every day for the useful information you publish. Excellent job!

    Tuesday, November 8, 2011 at 10:54 pm | Permalink
  8. great post.. i really enjoyed it

    Saturday, November 12, 2011 at 4:41 pm | Permalink
  9. It’s hard to find knowledgeable people on this topic, but you sound like you know what you’re talking about! Thanks

    Wednesday, November 16, 2011 at 1:39 pm | Permalink
  10. I am often to blogging and i really appreciate your content. The article has really peaks my interest. I am going to bookmark your site and keep checking for new information.

    Wednesday, November 16, 2011 at 6:07 pm | Permalink
  11. Heya i¡¦m for the primary time here. I found this board and I find It truly helpful & it helped me out much. I’m hoping to present one thing again and aid others like you helped me.

    Friday, November 18, 2011 at 2:52 pm | Permalink
  12. dell laptop wrote:

    My brother suggested I would possibly like this blog. He was totally right. This put up actually made my day. You can not consider just how so much time I had spent for this info! Thank you!

    Saturday, November 19, 2011 at 7:49 am | Permalink
  13. dell m6600 wrote:

    I used to be recommended this blog by way of my cousin. I’m not positive whether this post is written via him as nobody else recognise such exact about my problem. You are amazing! Thank you!

    Tuesday, November 22, 2011 at 2:21 pm | Permalink
  14. meditation wrote:

    I beloved up to you will receive performed proper here. The sketch is tasteful, your authored material stylish. nonetheless, you command get bought an impatience over that you would like be handing over the following. sick surely come more earlier again as precisely the similar just about very ceaselessly inside of case you shield this increase.

    Wednesday, November 23, 2011 at 6:00 pm | Permalink
  15. Simply desire to say your article is as astounding. The clarity in your publish is simply spectacular and i could assume you are an expert in this subject. Fine along with your permission let me to clutch your RSS feed to stay up to date with imminent post. Thanks a million and please carry on the enjoyable work.

    Saturday, November 26, 2011 at 8:52 am | Permalink
  16. I cherished up to you will obtain carried out right here. The cartoon is tasteful, your authored subject matter stylish. nonetheless, you command get bought an edginess over that you wish be turning in the following. sick no doubt come more beforehand once more as precisely the same nearly a lot regularly inside case you shield this increase.

    Sunday, November 27, 2011 at 7:02 am | Permalink
  17. I am extremely inspired along with your writing abilities as well as with the layout on your blog. Is that this a paid subject or did you customize it yourself? Anyway keep up the nice high quality writing, it¡¦s rare to peer a great blog like this one these days..

    Sunday, November 27, 2011 at 10:01 am | Permalink
  18. Test touches online casino below the cream. The flesh tosses test after tin circuit. The steep exit noses above test. The biased cylinder floors online casino. The insistence dies on the flaw.

    Monday, November 28, 2011 at 6:59 am | Permalink
  19. Thanks for your post. One other thing is that if you are disposing your property all on your own, one of the problems you need to be aware of upfront is just how to deal with home inspection records. As a FSBO retailer, the key towards successfully moving your property as well as saving money on real estate agent income is knowledge. The more you recognize, the easier your sales effort will likely be. One area where this is particularly significant is information about home inspections.

    Monday, November 28, 2011 at 11:49 pm | Permalink
  20. Hi there! I simply would like to give a huge thumbs up for the good data you could have right here on this post. I can be coming again to your weblog for extra soon.

    Thursday, December 1, 2011 at 2:14 pm | Permalink
  21. I do not even know how I finished up right here, but I believed this publish used to be good. I don’t recognise who you might be however definitely you’re going to a well-known blogger if you happen to aren’t already ;) Cheers!

    Friday, December 2, 2011 at 12:39 pm | Permalink
  22. Leonora Buss wrote:

    Most is already said in comments above, i am also a developer, both working with Umbraco and Sitecore (also EpiServer). I also hope that you compare things like performance, ease of learning, and the possibility to extend Sitecore, especially from a developers perspective those kind of things are important.

    Friday, December 2, 2011 at 5:54 pm | Permalink
  23. a2931018 wrote:

    I’ve said that least 2931018 times. The problem this like that is they are just too compilcated for the average bird, if you know what I mean

    Monday, December 5, 2011 at 9:58 am | Permalink
  24. Thanks for all your valuable labor on this web site. Gloria delights in getting into investigations and it’s obvious why. A lot of people hear all concerning the dynamic method you present powerful guidelines on this website and as effectively boost response from other individuals on the subject matter so our own daughter is truly studying lots of items. Take pleasure in the remaining portion with the new year. You are the one carrying out a splendid job.

    Monday, December 5, 2011 at 9:36 pm | Permalink
  25. You have an ideal blog, nice graphics, movies, layout. That is definitely a must-see web site!

    Tuesday, December 6, 2011 at 3:42 am | Permalink
  26. here wrote:

    Now you have your new website online and you’re keen to begin making some sales! However, how are you going to make sales in case you shouldn’t have high volumes of holiday makers to your website?

    Tuesday, December 6, 2011 at 11:58 am | Permalink
  27. Magnificent site. Plenty of useful information here. I¡¯m sending it to some friends ans also sharing in delicious. And of course, thank you for your effort!

    Tuesday, December 6, 2011 at 12:17 pm | Permalink
  28. Home wrote:

    Extremely rated post. I be taught one thing completely new on different blogs everyday. Deciding on one . stimulating to read the paper content material from different writers and be taught a little something from their website. I’d like to apply certain of this content on my weblog you’re mind. Natually I’ll give a hyperlink here we’re at your internet-site. Respect your sharing.

    Tuesday, December 6, 2011 at 3:25 pm | Permalink
  29. Appreciating the dedication you put into your website and detailed information you offer. It’s nice to come across a blog every once in a while that isn’t the same old rehashed material. Great read! I’ve saved your site and I’m adding your RSS feeds to my Google account.

    Tuesday, December 6, 2011 at 5:01 pm | Permalink
  30. Home wrote:

    Just killing some in between class time on Digg and I discovered your article . Not usually what I want to examine, however it was completely value my time. Thanks.

    Tuesday, December 6, 2011 at 6:27 pm | Permalink
  31. Jonathan wrote:

    I’m nonetheless studying from you, but I’m enhancing myself. I actually love reading every part that’s written on your blog.Preserve the tales coming. I beloved it!

    Tuesday, December 6, 2011 at 7:33 pm | Permalink
  32. I have to confess that I sometimes get bored reading the whole thing but I feel you can add some value. Bravo !

    Tuesday, December 6, 2011 at 10:47 pm | Permalink
  33. ketostix wrote:

    I am so grateful for your write-up.Really thank you! Great.

    Wednesday, December 7, 2011 at 8:11 am | Permalink
  34. Howdy! I simply want to give an enormous thumbs up for the good information you could have right here on this post. I will probably be coming back to your weblog for more soon.

    Wednesday, December 7, 2011 at 10:36 am | Permalink
  35. Good publish! GA can additionally be my biggest earning. Nonetheless, it’s not a much.:) http://www.aucklandforktruckhire.getlisted.co.nz/forklift-hire-auckland

    Wednesday, December 7, 2011 at 10:53 am | Permalink
  36. Thank you for the auspicious writeup. It in truth used to be a amusement account it. Look complicated to far brought agreeable from you! By the way, how can we keep up a correspondence?

    Wednesday, December 7, 2011 at 12:22 pm | Permalink
  37. blog posts wrote:

    I don¡¦t even understand how I ended up right here, but I believed this submit used to be good. I don’t understand who you are but certainly you are going to a famous blogger if you are not already ;) Cheers!

    Wednesday, December 7, 2011 at 3:28 pm | Permalink
  38. Rosy Bitah wrote:

    I think this is among the most important info for me. And i’m glad reading your article. But should remark on some general things, The site style is wonderful, the articles is really excellent : D. Good job, cheers

    Wednesday, December 7, 2011 at 6:43 pm | Permalink
  39. written piece supplies view of the issue. happy, It is actually great to observe perspectives of which interesting helpful when you character.

    Wednesday, December 7, 2011 at 7:18 pm | Permalink
  40. Hello there just happened upon your blog from Bing after I entered in, “is it bad practice to store xml in database? | Learn XML” or something similar (can’t quite remember exactly). In any case, I’m happy I found it because your content is exactly what I’m looking for (writing a college paper) and I hope you don’t mind if I collect some information from here and I will of course credit you as the reference. Thanks.

    Wednesday, December 7, 2011 at 9:02 pm | Permalink
  41. DK PVP wrote:

    Do you have a spam issue on this site; I also am a blogger, and I was wondering your situation; many of us have developed some nice procedures and we are looking to swap strategies with other folks, be sure to shoot me an e-mail if interested.

    Wednesday, December 7, 2011 at 11:20 pm | Permalink
  42. wonderful post, very informative. I wonder why the other experts of this sector do not notice this. You must continue your writing. I am sure, you have a great readers’ base already!

    Thursday, December 8, 2011 at 3:25 am | Permalink
  43. I loved as much as you’ll receive carried out right here. The sketch is tasteful, your authored subject matter stylish. nonetheless, you command get got an edginess over that you wish be delivering the following. unwell unquestionably come further formerly again since exactly the same nearly a lot often inside case you shield this increase.

    Thursday, December 8, 2011 at 6:49 am | Permalink
  44. Now more that ever you in all probability can’t have the funds for to simply take a seat again as your competitors shall be working additional time to make as a lot cash as they have been pre-recession. http://www.techrentals.getlisted.co.nz/hire-thermal-imaging-camera

    Thursday, December 8, 2011 at 1:44 pm | Permalink
  45. Great blog here! Also your web site loads up fast! What web host are you using? Can I get your affiliate link to your host? I wish my site loaded up as fast as yours lol

    Thursday, December 8, 2011 at 5:30 pm | Permalink
  46. Wow that was odd. I just wrote an incredibly long comment but after I clicked submit my comment didn’t appear. Grrrr… well I’m not writing all that over again. Regardless, just wanted to say superb blog!

    Thursday, December 8, 2011 at 5:32 pm | Permalink
  47. profile wrote:

    Discriminating communicating. I study something more challenging on different blogs everyday. It leave e’er be salty to feature aggregation off their writers and drill a less something from their store. I’d prefer to use some with all the volume in my weeny weblog whether you do not . Natually I’ll furnish a attach on your own net weblog. Many thanks intercourse.

    Thursday, December 8, 2011 at 7:40 pm | Permalink
  48. show display wrote:

    Im simply getting began down this road, the journey is going to be long, but my target is two years to have a full time earnings online and to have the opportunity spend extra time with my household instead of going for a nine to 5 job.. http://www.exhibitgroup.getlisted.co.nz/

    Friday, December 9, 2011 at 5:27 am | Permalink
  49. Hello! I just wanted to ask if you ever have any problems with hackers? My last blog (wordpress) was hacked and I ended up losing a few months of hard work due to no back up. Do you have any methods to stop hackers?

    Friday, December 9, 2011 at 6:47 am | Permalink
  50. My Profile wrote:

    My partner and I really loved reading this weblog publish, I used to be simply itching to know do you trade featured posts? I’m all the time looking for somebody to make trades with and merely thought I might ask.

    Friday, December 9, 2011 at 7:59 am | Permalink
  51. yen, my entry on Bag of Beans with all the photos will be posted within the day in Pinoy Food Talk.

    Friday, December 9, 2011 at 10:16 pm | Permalink
  52. Excellent post je partage sur facebook

    Saturday, December 10, 2011 at 1:29 am | Permalink
  53. hosting wrote:

    What’s up I am from Australia, this time I am viewing this cooking related video at this web page, I am actually glad and learning more from it. Thanks for sharing.

    Saturday, December 10, 2011 at 2:42 am | Permalink
  54. pretty helpful stuff, overall I feel this is really worth a bookmark, thanks

    Saturday, December 10, 2011 at 2:52 am | Permalink
  55. myślistwo wrote:

    Thanks a lot for sharing this with all of us you really know what you’re talking about! Bookmarked. Please also visit my website =). We could have a link exchange agreement between us!

    Saturday, December 10, 2011 at 7:53 am | Permalink
  56. listings wrote:

    Very interesting information!Perfect just what I was searching for! “One man’s folly is another man’s wife.” by Helen Rowland.

    Saturday, December 10, 2011 at 3:10 pm | Permalink
  57. I like your writing style genuinely enjoying this website. “The aim of education is the knowledge not of fact, but of values.” by William Ralph Inge.

    Sunday, December 11, 2011 at 12:34 am | Permalink
  58. I’m truly enjoying the design and layout of your site. It’s a very easy on the eyes which makes it much more enjoyable for me to come here and visit more often. Did you hire out a developer to create your theme? Fantastic work!

    Sunday, December 11, 2011 at 1:29 am | Permalink
  59. I just couldn’t depart your site before suggesting that I extremely enjoyed the standard info a person provide for your visitors? Is gonna be back often in order to check up on new posts

    Sunday, December 11, 2011 at 6:37 am | Permalink
  60. uggs sale wrote:

    Also, weblog often and with interesting material to maintain individuals interested in coming back and checking for updates.

    Sunday, December 11, 2011 at 7:40 am | Permalink
  61. Thanks , I have just been looking for information about this topic for ages and yours is the best I’ve came upon till now. However, what concerning the conclusion? Are you certain in regards to the source?

    Sunday, December 11, 2011 at 10:55 am | Permalink
  62. I have to voice my gratitude for your generosity for women who should have guidance on in this question. Your very own dedication to passing the message all around appeared to be especially good and has regularly permitted others just like me to achieve their goals. Your amazing interesting facts entails a great deal to me and much more to my peers. Best wishes; from all of us.

    Sunday, December 11, 2011 at 12:18 pm | Permalink
  63. Hey there, I think your blog might be having browser compatibility issues. When I look at your blog site in Ie, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, excellent blog!

    Sunday, December 11, 2011 at 1:21 pm | Permalink
  64. Archie Nie wrote:

    its horses for courses, everyone has their own opinions and preferences, there is no difference here

    Sunday, December 11, 2011 at 1:36 pm | Permalink
  65. That was clever. I’ll be stopping back.

    Sunday, December 11, 2011 at 4:01 pm | Permalink
  66. Good article , thanks and we want more! Added to FeedBurner as well

    Sunday, December 11, 2011 at 5:26 pm | Permalink
  67. Thanks for this share.

    Sunday, December 11, 2011 at 7:31 pm | Permalink
  68. Hello! I just would like to give a huge thumbs up for the great info you have here on this post. I will be coming back to your blog for more soon.

    Sunday, December 11, 2011 at 7:37 pm | Permalink
  69. You…are…my…hero!!! I cant believe something like this exists on the internet! Its so true, so honest, and more than that you dont sound like an idiot! Finally, someone who knows how to talk about a subject without sounding like a kid who didnt get that bike he wanted for Christmas.

    Sunday, December 11, 2011 at 8:40 pm | Permalink
  70. lamp post wrote:

    This actually answered the problem, thank you!

    Monday, December 12, 2011 at 1:29 am | Permalink
  71. good just right…this submit merits nothing :( …hahaha just joking :P …good post :P http://www.drainsurgeons.getlisted.co.nz/unblocking-sink-drain

    Monday, December 12, 2011 at 2:52 am | Permalink
  72. cupcakes wrote:

    Thank you, I’ve just been looking for information approximately this subject for ages and yours is the best I’ve discovered so far. But, what in regards to the bottom line? Are you certain about the supply?

    Monday, December 12, 2011 at 3:26 am | Permalink
  73. odt wrote:

    I should check with you here, which is not something I normally do! I get pleasure from reading a blog that may make people think. Additionally, thanks for permitting me to remark!

    Monday, December 12, 2011 at 8:52 am | Permalink
  74. 8x8 gazebo wrote:

    It is extremely helpful for me. Huge thumbs up for this blog post!

    Monday, December 12, 2011 at 10:29 am | Permalink
  75. Heya! I’m at work browsing your blog from my new iphone 3gs! Just wanted to say I love reading your blog and look forward to all your posts! Carry on the excellent work!

    Monday, December 12, 2011 at 12:39 pm | Permalink
  76. Thank you for all of the effort on this blog

    Monday, December 12, 2011 at 1:25 pm | Permalink
  77. AKO wrote:

    Thanks pertaining to taking turns this kind of wonderful subject material on your web-site. I came across it on google. I may check back again whenever you post additional aricles.

    Monday, December 12, 2011 at 2:49 pm | Permalink
  78. It’s extremely useful for me. Large thumbs up for this blog post!

    Monday, December 12, 2011 at 5:19 pm | Permalink
  79. cheap uggs wrote:

    Am i the sole one whom is seeing the comment column collapsed? especially the save comment button is screwed up and furthermore previewing option is not working. is it my browser issue or something with this web page?

    Monday, December 12, 2011 at 7:18 pm | Permalink
  80. I would like to thank you for the efforts you’ve put in writing this blog. I am hoping the same high-grade website post from you in the upcoming as well. In fact your creative writing skills has encouraged me to get my own web site now. Really the blogging is spreading its wings quickly. Your write up is a great example of it.

    Monday, December 12, 2011 at 9:48 pm | Permalink
  81. Hello there, simply become alert to your weblog via Google,my site is http://www.chilggoooto.com

    Monday, December 12, 2011 at 10:03 pm | Permalink
  82. Great blog! Do you have any hints for aspiring writers? I’m hoping to start my own blog soon but I’m a little lost on everything. Would you advise starting with a free platform like WordPress or go for a paid option? There are so many choices out there that I’m completely confused .. Any ideas? Bless you!

    Tuesday, December 13, 2011 at 1:00 am | Permalink
  83. Joshua Kock wrote:

    I think one of your advertisings caused my browser to resize, you might want to put that in your blacklist.

    Tuesday, December 13, 2011 at 10:55 am | Permalink
  84. Oh my goodness! an amazing article. Thank you!

    Tuesday, December 13, 2011 at 11:26 am | Permalink
  85. Victory wrote:

    I find it amazing that you make this info for free!

    Tuesday, December 13, 2011 at 5:33 pm | Permalink
  86. After studying a few of the blog posts in your website now, and I really like your means of blogging. I bookmarked it to my bookmark web site list and will be checking again soon. Pls check out my site as well and let me know what you think.

    Wednesday, December 14, 2011 at 6:46 am | Permalink
  87. juuso toikka wrote:

    I found your posting to be insightful! Thank you.

    Wednesday, December 14, 2011 at 7:43 am | Permalink
  88. Witty! I’m bookmarking you site for future use.

    Wednesday, December 14, 2011 at 7:50 am | Permalink
  89. Hi there, simply was aware of your blog via Google,my site is http://www.chilggoooto.com

    Wednesday, December 14, 2011 at 9:18 am | Permalink
  90. A person created a few respectable points there. I appeared on the internet to the concern and identified many folks can go with with your web site.

    Wednesday, December 14, 2011 at 9:40 am | Permalink
  91. Witty! I’m bookmarking you site for future use.

    Wednesday, December 14, 2011 at 5:02 pm | Permalink

Post a Comment

Your email is never published nor shared.