Question 59: You have been given below table definition

CREATE TABLE reviews (

  review_id text,

  downcount int,

  upcount int,

  creation_date timestamp,

  PRIMARY KEY (review_id)

)

Now you want to update the upcount value by 1, hence you run the following query

update reviews set upcount = upcount +1 where review_id='123456';

What do you expect, out of this ?

  1. It will successfully increment upcount by 1 for review_id='123456'
  2. Get all Questions and Answer from here
  3. You need to have paid subscription to access all questions
  4. Thanks for considering Python Certification Material

Correct Answer: 3

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.

CREATE TABLE reviews (

  review_id text,

  creation_date timestamp,

You can access to full explanation to question and answer from this page.