官术网_书友最值得收藏!

Static columns act like predefined joins

Now that we've explored the behavior of static columns, it's rather striking how similar the data model in users_with_status_updates is to the data model represented by users and user_status_updates taken together. In particular, both representations do the following:

  • Associate multiple status updates with a single user
  • Associate a single e-mail address and password with a single user
  • Allow creating and accessing discrete user records, with or without associated status updates

The difference is simply the interface to the data model: are we working with one table, or two? It turns out that users_with_status_updates behaves very much like the result of an SQL LEFT JOIN of users and user_status_updates. Cassandra, of course, does not support JOIN clauses when reading data; instead, this join is baked into the schema itself through the use of static columns.

主站蜘蛛池模板: 内黄县| 锡林郭勒盟| 溆浦县| 奉贤区| 翼城县| 开鲁县| 石泉县| 班戈县| 延长县| 贵州省| 南溪县| 琼海市| 盐池县| 合川市| 宁晋县| 玉龙| 垣曲县| 南京市| 资源县| 大同县| 噶尔县| 花垣县| 多伦县| 佛山市| 武定县| 滨州市| 治多县| 沈丘县| 兴文县| 奎屯市| 泰和县| 乌什县| 铜鼓县| 上犹县| 吴忠市| 元朗区| 平安县| 建瓯市| 竹溪县| 噶尔县| 黄平县|