The question is purely theoretical.
How to store in the database (MySQL, PostgreSQL) information about documents of different structure, while after commissioning do not change the structure of fields when new documents appear?
For example, when developing there is the following sample document
ΠΡΠ³Π°Π½ΠΈΠ·Π°ΡΠΈΡ: Π ΠΎΠ³Π° ΠΈ ΠΠΎΠΏΡΡΠ° ΠΠΠ ΠΠ°ΡΠ°: 24.10.2011 ΠΠ°Π»ΡΡΠ°: RUB Π‘ΡΠΌΠΌΠ°: 10000,00
When the code was put into operation, a new type of document appeared that needs to be stored in the database, while logically practically not connected with the first
ΠΡΠ³Π°Π½ΠΈΠ·Π°ΡΠΈΡ: Π ΠΎΠΌΠ°ΡΠΊΠ° ΠΠΠ ΠΠ°ΡΠ°: 25.10.2011 ΠΠ°ΠΈΠΌΠ΅Π½ΠΎΠ²Π°Π½ΠΈΠ΅ ΠΠ΄ ΠΈΠ·ΠΌ Π¦Π΅Π½Π° Π’ΠΎΠ²Π°Ρ 1 ΡΡ. 5000,00 Π’ΠΎΠ²Π°Ρ 2 Π³. 1000,00
And there in a month you still need to keep another document.
ΠΠ°ΡΠ° 31.12.2011 Π‘ΡΠΌΠΌΠ°: 1000000,00 ΠΠ°Π·Π½Π°ΡΠ΅Π½ΠΈΠ΅: ΠΡΠ΅ΠΌΠΈΡ ΠΏΠΎΠ΄ ΠΠΎΠ²ΡΠΉ ΠΠΎΠ΄
That is, we need a kind of pattern for universal storage of documents. Simply XML in the field is not suitable. The data will need to be analyzed later. That is, insert reports into any reports using SQL queries.