In order to support the document workflow, I have added 6 new tables to the database, organised into 3 pairs. The first pair of tables governs the overall status of a document version per the document life cycle rules, the second pair of tables record the review status and the final pair of tables record the approval status for each document verison.
The reason for recording the information in table pairs rather than within a single table for each data set is that it allows MyDMS to log historical data in an auditable, automatic way. It does make reporting a little more difficult, as one has to use a more complex query in order to retrieve the status of a given document version, but it does ensure that all transactions are recorded correctly and atomically without the overhead of having to programme in locks and scheduling. The database takes care of all of that on your behalf.
Now, as I have indicated, this is not without its overhead when querying the database. In fact, there is a small but significant change required in order to be able to support these queries without losing performance, namely the use of temporary tables to capture interim data used in a subsequent query. This makes certain assumptions about the capabilities of the underlying database and may have an impact upon the portability of MyDMS across different DMS engines. I am currently developing MyDMS using MySQL 4.1, and do not have ready access to other platforms such as PostgresSQL, so I do not know how this will affect non-MySQL users of MyDMS. Hopefully, all that anybody needs to do in order to support this new requirement is to ensure that the database user for MyDMS has drop table privileges in addition to their usual privileges.