Question-25: You have been given below table design
CREATE TABLE he_food_chain(
country_code text,
state text,
city text,
cafe_name text,
PRIMARY KEY (country_code, state, city, cafe_name )
);
Which of the following statement is/are correct?
- All café within a country, state and city reside in the same partition.
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering Python Certification Material
Ans : B,D
Exp : As we defined Primary Key as (country_code, state, city, cafe_name) then it means only first column is considered as Partition Key which country_code in this case. Hence, all the data will be partitioned based on the country_code.
You can access to full explanation to question and answer from this page.