Skip to content

Comment on SQL and NoSQL are two sides of the same coin, mathematically

Comments

But what about many to many relations? How do those map to nosql?

Instead of:

    [person_id,person_name]  [team_id,team_name] [person_id, team_id]
You get:
    [person_id, person_name, [team_id, team_id, ...]]
    [team_id, team_name, [person_id, person_id, ...]]

I think there are three physical ways to do this. With nosql they are all 'in model', including the relational one, with elements with both other keys as a key.

But the other two with a list of keys as part of the values is available too.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.