For an application that I currently plan to scale up, there's a bunch of JSON dicts and directories making up the "database". The reason I didn't use SQL initially, is simply because I've never learned the language, and right now I'm forcing myself to.
The application has a constantly updated data structure (I'd not reject calling it schema), so it is important that newer versions of the app must accept old existing data, and preserve obsolete fields that might otherwise be reintroduced in later versions. - This is why I've always stored records in JSON files, as it's easy for me to handle the data.
I have basic knowledge about the relational model, and
Q1: I appreciate some advice on how to idiomatically write code that cope with and operate on different versions of the data and the schema.
I know something about the diversity (incompatibility I mean) of SQL implementations, and I'm planning to choose just one specific implementation to adapt my application for.
I've come up with something that I can sensibly tell that it's an anti-pattern:
Q2: Would storing JSON data along side unique table key and sorting key, just for the purpose of using SQL implementation to scale up the performance, and parse JSON data using application code an anti-pattern? And how should I avoid it?