incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: Using CQL to insert a column to a row dynamically
Date Mon, 27 May 2013 19:41:41 GMT
On Mon, May 27, 2013 at 9:28 AM, Matthew Hillsborough
<matthew.hillsborough@gmail.com> wrote:
> I am trying to understand some fundamentals in Cassandra, I was under the
> impression that one of the advantages a developer can take in designing a
> data model is by dynamically adding columns to a row identified by a key.
> That means I can model my data so that if it makes sense, a key can be
> something such as a user_id from a relational database, and I can for
> example, create arbitrary amounts of columns that relate to that user.

Fundamentally?  No.  Experience has shown that having schema to say
"email column is text, and birth date column is a timestamp" is very
useful as projects and teams grow.

That said, if you really don't know what kinds of attributes might
apply (generally because they are user-generated) you can use a Map.

> Wouldn't this type of model make more sense to just stuff into a relational
> database?

There's nothing wrong with the relational model per se (subject to the
usual explanation about needing to denormalize to scale).  Cassandra
is about making applications scale, not throwing the SQL baby out with
the bathwater for the sake of being different.

-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder, http://www.datastax.com
@spyced

Mime
View raw message