Data or Document orientation If you are primarily storing documents, then a Native XML Database may be the best option. However it will depend on document structure and on the kinds of questions you need to ask about the information / data that the documents contain.
Native XML Database If primarily storing and querying the content of documents, especially with: –varying structure. –mixed content –recursive content –complex mix of elements and attributes Documents best encoded & handled with XML If you have lots of different XML datatypes and schema or you have lots of well-formed XML to deal with, the native XML DBMSs make it much easier to efficiently store and retrieve well-formed XML.
RDBMS If you are primarily storing data or data-oriented documents (primarily of interest to an application) then mapping documents into relations may be appropriate where there is: –clear metadata head-body structure primarily queried on metadata (which tends to be fixed structure) –a simple schema - otherwise you get lots of tables, complex query joins and slow access times few tables and lots of null column entries which need complex interpretation If you have a small number of XML schema to work with, are able and prepared to design appropriate storage strategies and to build data loading programs, an XML- enabled RDBMS may be satisfactory.
Importing and Exporting XML to/from MSAccess http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k2/html/odc_accessxml.asp Oracle9i SQL/XML http://www.oracle.com/technology/oramag/oracle/03-may/o33xml.html Native XQuery engine integrated with Oracle Database 10g Release 2. http://www.oracle.com/technology/pub/articles/vasiliev_xquery.html
Complexity of queries The ways in which information will be queried is an important factor. –Retrieval / manipulation of structured data -- RDBMS –Full-text searching, or manipulating a recursive content model --Native XML Database or XML enabled Database with an appropriate XML query language e.g. bill of materials or build configuration queries are difficult for SQL, but straightforward in XPath
Existing investment DBMS Existing applications and data resources Tools and add-ons –report generators –forms Skill-sets –3NF –SQL –Experience of existing environment
Relative Cost If you have a heavy investment in an Object-Relational DBMS their XML add-on support may be appropriate. If you are starting from scratch, the Native XML DBMSs are generally cheaper, lighter, and easier to manage.
Data integrity Referential integrity is at the core of the relational model. In XML the concept of integrity is less well defined and application code will be required to maintain integrity. If there is a strong requirement for data integrity, then a relational or XML enabled database may be the better solution. When mapping an XML document into a relational database (if you're not using a BLOB to store the whole document), some information about the document will be lost. If you require that data must retain its original structure, into and out of storage, then an Native XML Database is the best solution.