javaxmlmongodborientdbdatabase

Which one better for XML data Mongodb or orientdb


I cannot use an XML base database. Have to choose from mongo DB or orient DB. Which one will be more suitable for XML based data. where I can directly save or fetch XMLs, run xpath, jquery.


Solution

  • MongoDB and OrientDB both store data in a JSON (like) data structure. JSON is not compatible with XML (only for simple use cases, where XML is used in a data centric way). So both are not suitable for native storage of XML. You can store the document as CLOB/BLOB. However, in that case a RDMBS or key-value store is also a good fit.

    If you need to query the XML data (by using XQuery and/or XPath) your really should use a XML database. Highly recommended: basex and existdb (both are Java based, same as OrientDB).