- Learning Apache Cassandra(Second Edition)
- Sandeep Yarabarla
- 153字
- 2021-07-03 00:19:36
Coupling parents and children using static columns
The parent-child relationships we've encoded in our schema thus far are implicit in the structure of the primary keys but not explicit from Cassandra's standpoint. While we know that the user_status_updates.username column corresponds to the parent primary key users.username, Cassandra itself has no concept of the relationship between the two.
In a relational database, we might make the relationship explicit in the schema using foreign key constraints, but Cassandra doesn't offer anything like this. In fact, if we want to use two different tables for users and user_status_updates, there isn't anything we can do to explicitly encode their relationship in the database schema. However, there is a way to combine user profiles and status updates into a single table while still maintaining the one-to-many relationship between them. To achieve this merger, we'll use a feature of Cassandra tables that we haven't seen before—static columns.
- Splunk 7 Essentials(Third Edition)
- Visual C# 2008開發技術詳解
- 網絡組建與互聯
- 電腦日常使用與維護322問
- LMMS:A Complete Guide to Dance Music Production Beginner's Guide
- Data Analysis with R(Second Edition)
- 智能+:制造業的智能化轉型
- 菜鳥起飛五筆打字高手
- 傳感技術基礎與技能實訓
- Building Analytics Teams
- 白話機器學習算法
- 仿蛛機器人的設計與制作
- Hands-On Data Analysis with Scala
- Ripple Quick Start Guide
- 精通LabVIEW 8.x