Question 48: You have been given metadata for creating Cassandra table.

Category text

Created_year int

course_id uuid

published_date timestamp

course_detail text

course_title text

user_id uuid

And you have created table as below

CREATE TABLE HADOOPEXAM (

  Category text,

  Created_year int,

  published_date timestamp,

  course_title text,

  course_detail text,

  user_id uuid,

  course_id uuid,

  PRIMARY KEY ((course_id))

);

 

What do you see in above table creation definition assuming combination of these three columns course_id, Category, Created_year to be unique across all data.

  1. It is a good design of table, it can avoid the upserts.
  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

Exp : Certainly its a bad table design in Cassandra. As you know it will not take care of record uniqueness also you can not make range query based on Created_year column. Assume our data as below

course_id, published_date, Created_year, course_title, course_detail, user_id

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