|
|
|
|
|
by chc
3575 days ago
|
|
Let me give an example: We process some large forms (say 100+ fields). We care a lot about maybe 15 fields off these forms, but we use the others sometimes. These forms change every so often, with some fields disappearing and new fields joining in. The fields we care a lot about don't change, but the ones we care a little about do. A few possibilities here: 1. You could have a table for every variant of the form 2. You could have a table with every field that's ever been used as a nullable field and add new columns every time a new version of the form appears 3. You could have a table with columns for the important fields and a JSONB column for the variable data Of the three options, 3 seems the most elegant to me. The other two are basically allowing the ugliness of the source data to spew complexity all over your database. |
|