Question 54: You have following table definition

CREATE TABLE TRINING_COURSE (

  id uuid,

  course_sequence int,

  course_id uuid,

  title text,

  category text,

  trainer text,

  PRIMARY KEY  (id, course_sequence ) );

  ALTER TABLE TRINING_COURSE ADD LOCATION map<timestamp, text>;

  ALTER TABLE TRINING_COURSE ADD emails set<text>;

And you also apply the following CQL

CREATE INDEX MYINDEXVALUE ON TRINING_COURSE (LOCATION);

CREATE INDEX MYINDEXKEY ON TRINING_COURSE (KEYS(LOCATION));

Which statement is correct?

  1. There will be two indexes created one on Location keys and other on Location values
  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: 4

Explanation: Indexes on the keys and values of a map cannot co-exist. For example, if you created MYINDEXVALUE, you would need to drop it to create an index on the map keys using the KEYS keyword and map name in nested parentheses:

 

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