126.96.36.199.2. External Database Storage
Docmenta supports the storage of the product documentation in a relational database. The database system can be located on the same host as the web-server or on a separate server. Following illustrations show the two options:
Figure 2.7.3. Local database storage (recommended)
Figure 2.7.4. Remote database storage (not recommended)
Note that for performance reasons it is recommended to place the database-system on the same host as the web-server. This is because fine grained communication is taking place between the web-server and the database system, i.e. high latency between both systems will reduce the responsiveness of the web-application.
For the object-relational mapping Docmenta uses the Open-Source framework "Hibernate" (http://www.hibernate.org). In principle, all database-systems that are supported by Hibernate 3.6 and that support Blob and Clob storage should work. However, not all of the databases that are supported by Hibernate have been tested to work with Docmenta.
Note that even if database-storage is used, a document-store directory is still required. Besides the database configuration, the document-store directory stores global application settings and user data. Only product-related data is stored in the database. Following the filesystem-structure that Docmenta creates for the external-database-storage:
Figure 2.7.5. Directory structure of external-database-storage
The product directory needs to be defined as part of the product configuration. In the product directory Docmenta creates a file named "db.properties", which stores the configured database connection properties (e.g. JDBC driver classname, connection URL, ...). Note that different products can be stored in the same database system or in different database systems. For example, product_A could be stored in a MySQL database, whereas product_B could be stored in a Oracle database. Furthermore, it is possible to store different products in the same database instance or in different database instances within the same database system. Following figure illustrates the different possibilities:
Figure 2.7.6. External database storage options
Note that all versions and all translations of a product are always stored in a single database instance (i.e. it is not possible to store different versions and/or different languages of the same product in different database instances). Having all versions of a product in a single database instance allows more efficient storage, as content-nodes that are unchanged from one version to another are stored only once. However, it is possible to copy selected versions/languages of a product into a new product (see Section 188.8.131.52, “Copying a product”).
For the storage of the exported publications, two options exist: inside or outside of the database. If exported publications are stored outside of the database, then the exported files are stored in the sub-directory named "publications" within the product directory. See the section "Publication archive inside or outside of the database?" below for details.