126.96.36.199. Storage types
Table of Contents
Docmenta supports following storage types:
- External database
- Embedded database (Apache Derby)
Up to Docmenta version 1.5 the only available storage type was filesystem-storage. In Docmenta version 1.6 external-database-storage and embedded-database-storage have been added. The three storage types are described below.
Which storage type to use?
Database-storage is recommended in case many users are editing the product-documentation at the same time. This is because filesystem-storage blocks other users if one user is executing a long running operation (e.g. import). On the other hand, filesystem-storage has the advantage that the product-documentation can be put under version control (e.g. Subversion). For example, in case of a software-product, the product-documentation could be put under the same version control system as the product source-code.
Note that the storage type needs to be defined for each product. Therefore, different products in the same Docmenta installation can have the same or different storage types. For example, a product product_A could be stored in a MySQL database, whereas for product product_B filesystem-storage could be used (both in the same Docmenta installation).
Converting the storage type
It is possible to convert the storage type of an existing product. To convert a product from one storage type to another (e.g. from filesystem-storage to database storage), the product needs to be copied as described in Section 188.8.131.52, “Copying a product”. Select the desired storage type in the destination product. After the copy operation has been completed, the source product can be replaced by the copy. To do this, the source product needs to be deleted or renamed. Finally, the ID of the copied product can be changed to the previous ID of the source product.
Publication archive inside or outside of the database?
In case a product is stored in a database (external or embedded), two options exist for the storage of exported publications:
- Store exported publications inside of the database.
- Store exported publications outside of the database.
Which option is used needs to be defined during the initial product creation. Note that using the first option can lead to a large database instance, which reserves a lot of disk space (depending on the size and amount of publications kept in the Docmenta publication archive).
If the second option is used, then exported publictions are stored in the sub-directory "publications" within the product directory. As in this case, the database does not store any exported publications, the database instance itself remains lean. However, this option might be dangerous, as files in the "publications" folder can easily be replaced manually, which might lead to data inconsistency.
Note that it is not easily possible to switch between the two storage options after the product has been created (currently the only way to change the storage option is to copy the product and to switch the storage option for the copy). Therefore, which option best fits the personal needs should be considered thoroughly before the product is created.