Quantcast
Channel: Question and Answer » postgresql
Viewing all articles
Browse latest Browse all 1138

Storing generated documents that can not be updated by changes in relationships

$
0
0

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:

  1. Store the generated PDF. But I think that would occupy unnecessary space and prevent queries “in” document.

  2. 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.


Viewing all articles
Browse latest Browse all 1138

Trending Articles