Database Reference
In-Depth Information
Cassandra 2.1
The recently released Cassandra 2.1 enables a few important features along with many
performance-related fixes. In this section, we will discuss three important features sup-
ported by Cassandra 2.1:
User-defined types
Frozen types
Indexing on collection attributes
Note For a complete overview of what's new in Cassandra 2.1, see the following
documentation page: www.datastax.com/documentation/cassandra/
2.1/cassandra/features2.html .
User-Defined Types
User-defined types allow you to combine multiple fields of information in a single
table. For example, you can have a single field with information from multiple fields
using the CQL3 shell like this:
create type if not exists
twitter_keyspace.user_metadata(fname,lname)
Here user_metadata is a user-defined type which is a wrapper on multiple
columns. With user-defined types, we can simplify data modeling schema by reducing
multiple tables to fewer tables.
Frozen Types
Using the frozen keyword, we can define a particular user-defined type as follows:
CREATE TABLE twitter_keyspace.users (
user_id timeuuid PRIMARY KEY,
Search WWH ::




Custom Search