Chamila Wijayarathna
Chamila Wijayarathna

Reputation: 1933

Cassandra for changing information need

When I read about Cassandra and Data Modeling, it says that Cassandra has a query based data modeling. So what I understood from this is, in a database I need to have a separate CF for every select query I want to execute. Is this true? Is it fine to use Cassandra to create a database where information need is not clearly defined (i.e. new queries can be introduced in the future) ?

Upvotes: 0

Views: 46

Answers (1)

phact
phact

Reputation: 7305

The short answer is yes, the long answer is, it depends on your use case.

Cassandra best practices are designed to help users achieve sub millisecond latencies and very high transaction volumes (millions / second). In order to achieve these results, you need to be very deliberate about your data model.

That being said, if your workload and SLA's are a bit more flexible than what I described, you will have some wiggle room. Some of the datastax enterprise integrations like search and analytics will also give you flexibility for ad-hoc querying.

It is likely that you can design tables that will support more than one query. However, don't be afraid of data duplication, it is often a good trade-off for performance and a c* best practice.

You can also modify existing tables using ALTER TABLE syntax: http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/alter_table_r.html

Upvotes: 1

Related Questions