title: Cassandra column key auto increment
body: <p>I am trying to understand Cassandra and how to structure my <em>column families (CF)</em> but it's quite hard since I am used to relational databases.</p>
  
  <p>For example if I create simple <code>users</code> CF and I try to insert new row, how can I make an incremental key like in MySQL?</p>
  
  <p>I saw a lot of examples where you would just put the username instead of unique ID and that would make a little sense, but what if I want users to have duplicated usernames?</p>
  
  <p>Also how can I make searches when from what I understand cassandra does not suport <code>&gt;</code> operators, so something like <code>select * from users where something &gt; something2</code> would not work.</p>
  
  <p>And probably the most important question what about grouping? Would I need to retrieve all data and then filter it with whatever language I am using? I think that would slow down my system a lot.</p>
  
  <p>So basically I need some brief explanation how to get started with Cassanda.</p>