1đź‘Ť
âś…
You might be interested in this post about FriendFeed’s schemaless SQL approach.
Loosely:
- Store documents in JSON, extracting the ID as a column but no other columns
- Create new tables for any indexes you require
- Populate the indexes via code
There are several drawbacks to this approach, such as indexes not necessarily reflecting the actual data. You’ll also need to hack up django’s ORM pretty heavily. Depending on your requirements you might be able to keep some of your fields as pure DB columns and store others as JSON?
👤dwurf
0đź‘Ť
I’ve never actually used it, but django-not-eav looks like the tool for the job.
“This app attempts the impossible: implement a bad idea the right way.” I already love it 🙂
That said, this question sounds like a “rethink your approach” situation, for sure. But yes, sometimes that is simply not an option…
👤frnhr
Source:stackexchange.com