Modeling many-to-many relations in Cassandra 2 with CQL3

后端 未结 2 1968
我在风中等你
我在风中等你 2021-02-09 12:49

What is the canonical way to model many-to-many relations with CQL3 ? Let\'s say I have to tables

CREATE TABLE actor (
    id text PRIMARY KEY,
    given text,
          


        
2条回答
  •  隐瞒了意图╮
    2021-02-09 13:35

    The way to achieve it is denormalizing data creating an actors_by_fans and a fans_by_actors. You can also use sets but this have limitations you already mentioned.

    HTH, Carlo

提交回复
热议问题