Database Reference
In-Depth Information
▪ Start with your queries. Ask what queries your application will need, and model the data
around that instead of modeling the data first, as you would in the relational world. This can
be shocking to some people. Some very smart people have told me that this approach will
cause trouble for the Cassandra practitioner down the line when new queries come up, as
they tend to in business. Fair enough. My response is to ask why they assume their data types
would be more static than their queries.
▪ You have to supply a timestamp (or clock) with each query, so you need a strategy to
synchronize those with multiple clients. This is crucial in order for Cassandra to use the
timestamps to determine the most recent write value. One good strategy here is the use of a
Network Time Protocol (NTP) server. Again, some smart people have asked me, why not let
the server take care of the clock? My response is that in a symmetrical distributed database,
the server side actually has the same problem.
Summary
In this chapter we took a gentle approach to understanding Cassandra's data model of keyspaces,
column families, columns, and super columns. We also explored a few of the contrasts between
RDBMS and Cassandra.
Search WWH ::




Custom Search