If you have too much data on the single partition. Data will be partitioned on the basis of both columns ColumnName1 and ColumnName2 and data will be clustered on the basis of the ColumnName3. In above syntax, ColumnName1 and ColumnName2 are the compound partition key. Syntax Primary Key((ColumnName1,ColumnName2),ColumnName3.)) Compound Partitioning key: Compound partitioning key is specified by the following syntax. Clustering is the process that sorts data in the partition.ģ. Data will be partitioned on the basis of ColumnName1 and data will be clustered on the basis of ColumnName2. In above syntax, ColumnName1 is the partitioning key and ColumnName2 is the Clustering key. Syntax Primary key(ColumnName1,ColumnName2. Compound Primary Key: Compound primary key is specified by the following syntax. Data is spread on different nodes on the basis of the partition key.Ģ. Data is partitioned on the basis of that column. That column is also called partitioning key. In the single primary key, there is only a single column. Single Primary Key: Single primary key is specified by the following syntax.Primary key: There are two types of primary key. Syntax Create table KeyspaceName.TableNameġ. Column family is used to store data.Ĭommand ‘Create Table’ is used to create column family in Cassandra. The syntax of Cassandra query language (CQL) resembles with SQL language.Ĭolumn family in Cassandra is similar to RDBMS table.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |