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

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.

主站蜘蛛池模板: 仁怀市| 道孚县| 千阳县| 北安市| 乾安县| 镶黄旗| 健康| 西乡县| 宾阳县| 合川市| 余干县| 金华市| 泰来县| 镇原县| 宜春市| 磐安县| 拉孜县| 宿松县| 嘉峪关市| 诸城市| 清苑县| 资溪县| 云阳县| 寿阳县| 辰溪县| 会宁县| 白玉县| 通海县| 河北省| 庆城县| 镇沅| 德清县| 渝北区| 昭通市| 罗山县| 正阳县| 竹山县| 张家界市| 五家渠市| 突泉县| 漠河县|