title: How is denormalization handled in cassandra
body: <p>What is the best approach to update table with duplicate data?</p>
  
  <p>I have a table </p>
  
  <pre><code>table users (
  id text PRIMARY KEY,
  email text,
  description,
  salary
  )
  </code></pre>
  
  <p>I will delete, update, insert etc to this table. But I also have a requirement to be able to search by email, and description. If I create new table with new composite keys for email, and description, </p>
  
  <p>when I update my base table I do</p>
  
  <pre><code>insert into users (id, salary) values (1, 500);
  </code></pre>
  
  <p>I do not have the required data to also update my secondary table since all the client has is id and salary. How is the second table updated.</p>
  
  <h2>Other workarounds and shortcomings</h2>
  
  <ol>
  <li>I could have created a materialized view, but since the base table has only one primary key I can only add one more column. my search requirement requires more than one column.</li>
  <li>Create secondary indexes on the columns that will be searched on. But the performance for this would be bad since the columns I will be searching on would have high cardinality. i.e. description, email, etc</li>
  </ol>