Question : . Which of the following is correct statement with regards to Counter?
A. A counter column value is a 64-bit signed integer. B. You cannot set the value of a counter, which supports two operations: increment and decrement. C. To generate sequential numbers for surrogate keys, use the counter type. D. You can create an index on a counter column
Correct Answer : Get Lastest Questions and Answer : Explanation: A counter column value is a 64-bit signed integer. You cannot set the value of a counter, which supports two operations: increment and decrement.
Use counter types as described in the "Using a counter" section. Do not assign this type to a column that serves as the primary key or partition key. Also, do not use the counter type in a table that contains anything other than counter types and the primary key. To generate sequential numbers for surrogate keys, use the timeuuid type instead of the counter type. You cannot create an index on a counter column or set data in a counter column to expire using the Time-To-Live (TTL) property.
Question : You have been given below table definition
Correct Answer : Get Lastest Questions and Answer : Explanation: : You can use Cassandra's counter columns data type. Keep in mind you cannot mix counter columns with non-counter columns in the same column family if the non-counter columns are not part of the composite PRIMARY KEY. So you have to separate the counters into another column family, say reviews_counts.