3 ms·
RethinkDB certainly has schema. Indices have to be defined in order to get_all (=select) and join. My JSON docs are quite flat and use foreign keys heavily to f
by osullivj 10y ago
RethinkDB certainly has schema. Indices have to be defined in order to get_all (=select) and join. My JSON docs are quite flat and use foreign keys heavily to facilitate queries & joins. Guideline: if you find a doc with a member list in your design you should probably separate the member list into it's own table with a foreign key back to the parent doc and use joins to re-aggregate data. So I am normalizing the data just as I would for a relational DB. But I'm getting the benefit of using the same language for queries as the rest of the code - it's all Python. No more of that prepared statement JDBC shenanigans. And I get the massive benefit of RethinkDB's change feeds. So no need to build and maintain caches in all my server components. That's a big win.