0

I'm putting together a schema for a progressive story that will track user choices. Because it will unfold over at least a year, I need a schema that is safe to handle constant additions. I have a feeling that constantly adding new columns to existing tables is bad practice. My other consideration was that, using Postgres, I could store a JSON that could be read and replaced over time, but then nesting might be an issue if I wanted more complexity.

Are the best practices for creating a schema in which not all eventual variables are known?

2
  • It sounds like you are thinking of an EAV model. en.m.wikipedia.org/wiki/…
    – AMtwo
    Dec 8, 2019 at 23:06
  • Thanks for linking that. I took a look, but ultimately there is still a single table, the attributes, that must constantly be appended to as new variables are created, if I'm understanding it correctly. This still requires all the eventual variables to be known at the time of creation. But for my model, I need to be able to freely add in new variables throughout the existence of the tables.
    – Arc
    Dec 8, 2019 at 23:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.