Question-19: Which of the following is correct way to model your data so that minimum partition can be read while querying?

  1. Model your data around relationships among the data.
  2. Model your data around relationships among the objects.
  3. Model your data around the queries you will be using.
  4. A,C
  5. B,C

Ans: C

Exp: You should minimize the partition reads and model your data around the queries. Hence, option-3 is correct. For that you first need to find what queries you are going to execute.  For instance think below before modeling your data in Cassandra database

  • What grouping you would be using in your query
  • In what order you need your data, while extracting it.
  • What condition you will be using to filter the data.
  • What uniqueness is needed in the data?

Once you decided above than design your data model accordingly. Later on you should not change, if you want to change than consider creating materialized views.