javadatabase-designdocument-management

Document Management System - Database Design


I'm writing my own Document Management System (DMS) in Java (the ones available don't satisfy my needs).

The documents shall be described by the Qualified DublinCore Metadata Standard. The easiest way to do this, in my opinion is do pack the key-value pairs in a RDF model with a XML representation.

To store the metadata for all documents i have two ideas (the document files will be stored in the filesystem):

  1. Store all metadata of all documents in a single XML file
  2. Make a XML file for each document and store it either in the filesystem or in a RDBMS (like the H2 database engine for Java), a key-value database won't solve this because the keys for one document are not unique.

Since (many) documents are linked among each other the first approach may would be better for analysing the data, but the second approach may be much faster.

Which solution you would recommend? Or are there any better solutions?

Stefan


Solution

  • I don't know how your analysis work, but if you need the complete graph in memory to do your analysis then use variante 1 (Store all metadata of all documents in a single XML file), because you will get no gain (but only extra work) from variante 2 in this scenario.

    added

    If this extra work for variant 2 is not to much, then I recomend variant 2, because it can be more calable.