Document Management System - Database Design

I write my own document management system (DMS) in Java (available to me do not satisfy my needs).

Documents must be described in the DublinCore standard metadata standard. The easiest way to do this, in my opinion, is to assemble key-value pairs in an RDF model with an XML representation.

To save metadata for all documents, I have two ideas (document files will be stored in the file system):

  • Store all metadata of all documents in a single XML file
  • Create an XML file for each document and save it either in the file system or in the RDBMS (for example, in the core of the H2 database for Java), the database with the key will not solve this, because the keys for one document are not unique.

Since (many) documents are interconnected, the first approach may be better for data analysis, but the second approach can be much faster.

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

Stephen

+3
source share
5 answers

I don’t know how your analysis works, but if you need a complete graph in memory for analysis, use option 1 (Store all metadata of all documents in one XML file), because you will not get any benefit (but only additional work) from the option 2 in this scenario.

added

If this extra work for option 2 is not much, then I recommend option 2, because it can be more calibrable.

  • you can update or add document metadata by writing only a small XML file instead of a huge
  • , xml , xml, ( ).
+1
+1

: : JCR ( Java), JackRabbit. , , .

+1

I would look at a solution for NO SQL documents like Couch DB to find out if this might help you.

I do not like the file system solution; there is no abstraction to help you there.

0
source

If you always get access to all the documents, none of your approaches will be slower than the other. But I would recommend a second approach. When it comes to data analysis, you will need to read all the documents, so there is no difference if they are in different files or in one file ...

0
source

Source: https://habr.com/ru/post/1785030/


All Articles