Home Forums Programming XML if you're using typed xml in sql server 2008, does the xml you store need to have every node that's in the XSD? RE: if you're using typed xml in sql server 2008, does the xml you store need to have every node that's in the XSD?

  • Thanks for confirming what I already suspected re the nodes question.

    Regarding the storage question, a client has an old Access app I've been asked to refactor. The app has a table with almost two hundred columns, most of them sparsely populated if populated at all. I've been weighing whether to keep the table, as ugly as it is, or switch over to storing the data using xml. I know in sql you can flag columns as sparse, but I still object on principle to having such a wide table.

    Xml would let me store just the nodes/fields that are actually used, but it seems like there's a lot more overhead to storing and extracting the data. Storing all the tags would take up more room than the data they surround. I like the flexibility xml offers but it's so verbose.

    I'll try your suggestion to see if typed xml is stored more efficiently.

    Thanks again.