3 ms·
Yes, I was trying to understand if, for your use case, storing JSON properties for each user in a SQL text column would give the same result.
by swah 14y ago
Yes, I was trying to understand if, for your use case, storing JSON properties for each user in a SQL text column would give the same result.
- tomjakubowski 14y agoor this case could have the best of both worlds and use an HSTORE column - which can be queried by field - in PostgreSQL.
- taligent 14y agoYou could but then you're really trying to jam a JSON style modal into a relational database. You CAN do it. But the tools and query language will make it much harder to work with. Not to mention lack of indexes on individual fields.
- jeffdavis 14y agoPeople avoid introducing new data stores because it adds complexity and it's harder to do queries across data sets. Jamming different data models together in one system is a very viable strategy. Postgres supports functional indexes, so indexing individual fields within a JSON document is already possible. If it's not easy now it will be easy soon. Remember XML databases? They became extremely marginalized when relational systems started adding basic support.