3 ms·
Since we are a mysql shop, for this use-cases I serialize and store the form as xml in a CLOB column. For any field that needs to be searched on, I create an ad
by sgolestane 14y ago
Since we are a mysql shop, for this use-cases I serialize and store the form as xml in a CLOB column. For any field that needs to be searched on, I create an additional column.
Disadvantage of this is you can't run mysql queries against the data stored in the CLOB column.
- thibaut_barrere 14y agoAdding column per searchable field is precisely what I wanted to avoid :-) If you need to store multiple forms types, it gets hairy very fast. MongoDB allows to query inside the data (which is not a blob in that case).
- jeltz 14y agoSo does PostgreSQL, but I have no idea about MySQL. You can run xpath queries against XML documents, and you can also index specific xpath queries (there is no general indexing infrastructure for XML in PostgreSQL). For JSON no path lookup functions are included in the core yet, but I assume there are extensions which add them.