With regards to attorney at law began at this question, I have made the decision to place this as a residential area wiki question.

The main of now you ask ,, therefore, could it be appropriate to keep XML data inside a relational database? Exist generally possible ways to implement exactly the same goal? What database engines provide good support for XML data types (for example SQL Server), and do you know the issues surrounding so-known as "XML indexes"?

Databases are for storing data. XML is data. Therefore, underneath the right conditions it's perfectly valid to keep XML inside a database. Whether that's the best factor to complete is dependent on lots of factors that most likely can not be generalized.

For instance, for those who have an organized XML document that signifies an item (eg: a magazine inside a book shop), it in all probability is sensible to parse the information and store in in appropriate rows and posts inside a database designed for your data.

OTOH, make a database holding code samples. You've posts for language, description, and also the code. Within the situation of XML, clearly you'll keep XML within the code column.

So, like so other areas of software, "it is dependent".

One trouble with supporting XML within an RDBMS is the fact that you will find AFAIK no globally recognized rules to compare of XML documents. A relational database can in principle store any attribute value that may support assignment and comparison - this being necessary to relational projection for instance since the values of every attribute should be similar to one another. Comparison isn't any problem for many types: strings, amounts, binary etc. It's potentially harder for any XML document type.

Some SQL DBMSs (ie non-relational DBMSs) simply don't permit comparison of XML values whatsoever. For example Microsoft SQL Server enables XML-typed posts however they can't be in comparison and thus amongst other things Choose DISTINCT isn't supported.

it really is dependent on which type of data you're storing inside your DB, its normal for exemple to keep XHTML info on the database.. among the principes of the relational database would be that the details are atomic, i am talking about, you need to store something similar to

name    |   professions
Clark   |  writer, journaliste, superhero

so i'd be against to keep something similar to

name    |   information
Clark   |  <profession> writer </profession><profession> journaliste </profession><profession> superhero </profession>