title: When to use Blobs in a Cassandra (and CQL) table and what are blobs exactly?
body: <p>I was trying to understand better the design decision choice when making table entries in cassandra and when the blob type is a good choice.</p>
  
  <p>I realized I didn't really know when to choose a blob as a data type because I was not sure what a blob really was (or what the acronym stood for). Thus I decided to read the following documentation for the data type blob:</p>
  
  <p><a href="http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/blob_r.html">http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/blob_r.html</a></p>
  
  <blockquote>
    <p>Blob</p>
  
  <pre><code>Cassandra 1.2.3 still supports blobs as string constants for input (to allow smoother transition to blob constant). Blobs as strings are
  </code></pre>
    
    <p>now deprecated and will not be supported in the near future. If you
    were using strings as blobs, update your client code to switch to blob
    constants. A blob constant is an hexadecimal number defined by
    0xX+ where hex is an hexadecimal character, such as
    [0-9a-fA-F]. For example, 0xcafe.</p>
  
  <pre><code>Blob conversion functions
  
  A number of functions convert the native types into binary data (blob). For every &lt;native-type&gt; nonblob type supported by CQL3, the
  </code></pre>
    
    <p>typeAsBlob function takes a argument of type type and returns it as a
    blob. Conversely, the blobAsType function takes a 64-bit blob argument
    and converts it to a bigint value. For example, bigintAsBlob(3) is
    0x0000000000000003 and blobAsBigint(0x0000000000000003) is 3.</p>
  </blockquote>
  
  <p>What I got out of it is that its just a long hexadecimal/binary. However, I don't really appreciate when I would use it as a column type for a potential table and how its better or worse than other type. Also, going through some of its properties might be a good way to figure out what situations blobs are good for.</p>