Grokking the Advanced System Design Interview
Ask Author
Back to course home

0% completed

Vote For New Content
"This means that within each node, the data is stored in sorted order according ...

Amey Naik

Sep 22, 2021

"This means that within each node, the data is stored in sorted order according to the employee_id column."

0

0

Comments
Comments
A
Amey Naik4 years ago

This column has nothing to do with the 'column key', correct?

Design Gurus
Design Gurus4 years ago

Column key is the name of the column. For example, in the employee table, the column key would be 'employee_id', and column values will be the IDs like 455. 456, 457, etc.

Clustering key can contain multiple columns and the data stored will be sorted based on these col...

A
Amey Naik4 years ago

In cassandra, we have {key: value} Here are you saying key is combination of (row-key, column-key)? I am confused between clustering key and the column key. Are they related in any manner?

Design Gurus
Design Gurus4 years ago

Column key is used to uniquely identify a column.

Primary key is used to uniquely identify a row and can contain multiple columns.

Clustering key is just a part of the primary key.

In the table discussed under 'Clustering keys', here are the keys:

The 'State' column...

A
Amey Naik4 years ago

Thanks for the example. A row is a container for columns referenced by primary key. I am not able to map "Components of a Cassandra row" diagram to the table shown under Clustering Keys.

Looks like the table under clustering keys doesn't show in column keys and column ...

Design Gurus
Design Gurus4 years ago

Column keys are column names, e.g., State, City.

So the Cassandra data is stored as a collection of columns, where each column can be seen as a key-value pair:

State:CA, City:Sacramento, Zip:92403, ... State:CA, City:Sacramento, Zip:92250, ...

Each column is stored ...

On this page