- Learning Apache Cassandra(Second Edition)
- Sandeep Yarabarla
- 197字
- 2021-07-03 00:19:37
Summary
In this chapter, we were introduced to the concept of compound primary keys and learned that a primary key consists of one or more partition keys and, optionally, one or more clustering columns. We saw how partition keys—the only type of key we had previously encountered—can group related rows together and how clustering columns provide an order for these rows within each partition.
Compound primary keys allow us to build a table containing users' status updates because they expose two important structures: grouping of related rows and ordering of rows. In the user_status_updates table, we encoded the relationship between users and their status updates implicitly in the structure of the primary key; the partition key refers to the parent row in the users table. We also explored the use of static columns to make this relationship explicit, storing all the information about users and their status updates in a single table.
In Chapter 4, Beyond Key-Value Lookup, we will pe into new ways of interacting with data that is organized using compound primary keys, allowing us to build functionality in our application for viewing users' timelines in a variety of interesting ways.
- 零起步輕松學(xué)單片機(jī)技術(shù)(第2版)
- Canvas LMS Course Design
- 電腦上網(wǎng)直通車
- INSTANT Varnish Cache How-to
- 21天學(xué)通Visual Basic
- AI 3.0
- 可編程序控制器應(yīng)用實(shí)訓(xùn)(三菱機(jī)型)
- 網(wǎng)絡(luò)管理工具實(shí)用詳解
- R Data Analysis Projects
- 奇點(diǎn)將至
- Visual Studio 2010 (C#) Windows數(shù)據(jù)庫(kù)項(xiàng)目開(kāi)發(fā)
- Ansible 2 Cloud Automation Cookbook
- 未來(lái)學(xué)徒:讀懂人工智能飛馳時(shí)代
- AVR單片機(jī)工程師是怎樣煉成的
- 傳感器原理與工程應(yīng)用