1. When to use column family databases
In this lesson, we are going to discover when column family databases are suitable and when not.
2. Suitable cases - general cases
In general, column family databases are great when dealing with
large volumes of data.
They are also frequently used when we need extreme write speeds. We will discuss several scenarios that are a good fit for column family databases if these conditions are required.
3. Suitable cases - event logging
The first use case we are going to discuss
is event logging. As we learned in the chapter dedicated to document databases, applications may want to store the information of the events that occur,
such as
a user logging in,
application errors,
etc. This information can be saved in a column family database.
4. Suitable cases - Content Management Systems
Again, similar to document databases,
content management systems are also suitable for column family databases.
Comments,
links,
tags,
etc., can be saved in this kind of database.
5. Suitable cases - time-series data
Column family databases are also a good option for storing
time-series data, such as monitoring
the weather,
the traffic,
etc.
6. Unsuitable cases
By contrast, there are some situations where column family databases are not a good choice.
Column family databases are not the best option when prototyping or at the beginning of a project
because it is quite sure that we will need to change the queries very frequently. As we said in the first lesson of this chapter, column family databases are modeled by thinking about the queries we want to have in our application.
Changing the queries may imply changing the schemas of the column families, which can be
costly and may slow down productivity. Also, if we need to create
complex queries or if we need to join data across column families, this kind of database won't be the best option for our applications.
And finally, if we are not dealing with large amounts of data, a column family will probably be more than we need.
7. Let's practice!
Well done! Let's do some exercises to practice what we have learned!