- 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.
- Microsoft Power BI Quick Start Guide
- Practical Ansible 2
- 數據運營之路:掘金數據化時代
- 機器自動化控制器原理與應用
- 機艙監測與主機遙控
- STM32G4入門與電機控制實戰:基于X-CUBE-MCSDK的無刷直流電機與永磁同步電機控制實現
- INSTANT Drools Starter
- MATLAB/Simulink權威指南:開發環境、程序設計、系統仿真與案例實戰
- Statistics for Data Science
- 大數據技術基礎:基于Hadoop與Spark
- R Data Analysis Projects
- Learning ServiceNow
- Mastering MongoDB 3.x
- 運動控制系統(第2版)
- Creating ELearning Games with Unity