I have a system running with PostgreSQL and Yii Framework, which generates a few medical documents that, once ready, can’t be changed. For example: If my full name comes out on this document today, and then I change this tomorrow, that document from yesterday can’t get my “new name”. It’s like I need to have two versions: 1.0, with my old name, and the 1.1, with the new one. that’s what I thought first:
-
Store the generated PDF. But I think that would occupy unnecessary space and prevent queries “in” document.
-
store in a plain text like a JSON in a text field
what’s really clear to me is that it would not be possible to do this mechanism without avoiding the relationships between the tables. I also believe that storing the each field document in a table field to be a problem, because there are many multiple fields (documents can be up to 150 pages).
Hope I’ve made myself clear.