Professional Documents
Culture Documents
Chapter 3
Chapter 3
family database?
NOSQL CONCEPTS
Miriam Antona
So ware engineer
Column family databases - overview
Derive from Google BigTable
NOSQL CONCEPTS
Column family databases - structure
NOSQL CONCEPTS
Column family databases - structure
NOSQL CONCEPTS
Column family databases - structure
NOSQL CONCEPTS
Column family databases - structure
NOSQL CONCEPTS
Column family databases - structure
NOSQL CONCEPTS
Column family databases - structure
NOSQL CONCEPTS
Column family databases - structure
NOSQL CONCEPTS
Column family databases - structure
NOSQL CONCEPTS
Column family databases - structure
Timestamps: store date and time when the data was inserted.
Multiple values of a column
NOSQL CONCEPTS
Column family databases - example
NOSQL CONCEPTS
Column family databases - designing
Think about the queries
No joins
Add all the columns we need
NOSQL CONCEPTS
Popular column family databases
NOSQL CONCEPTS
Let's practice!
NOSQL CONCEPTS
Advantages and
limitations of
column family
databases
NOSQL CONCEPTS
Miriam Antona
So ware engineer
Advantages - flexibility
Rows within a column family can have di erent columns
NOSQL CONCEPTS
Advantages - speed
Related columns are stored together on disk
NOSQL CONCEPTS
Advantages - scalability
Scale horizontally
Sharding across multiple servers
NOSQL CONCEPTS
Advantages - large volumes of data
Designed to handle large volumes of data
speed
horizontal scalability
NOSQL CONCEPTS
Limitations
Atomic reads/writes but no multirow transactions
No joins support
No subqueries support
Can be costly
NOSQL CONCEPTS
Let's practice!
NOSQL CONCEPTS
When to use column
family databases
NOSQL CONCEPTS
Miriam Antona
So ware engineer
Suitable cases - general cases
Large volumes of data
NOSQL CONCEPTS
Suitable cases - event logging
Types of events:
User logging
Errors
...
NOSQL CONCEPTS
Suitable cases - Content Management Systems
Comments
Links
Tags
...
NOSQL CONCEPTS
Suitable cases - time-series data
Weather
Tra c
etc.
NOSQL CONCEPTS
Unsuitable cases
Prototyping and at the beginning of a project
Need to change the queries very frequently
Changing the queries -> may imply changing the design of the column families
NOSQL CONCEPTS
Let's practice!
NOSQL CONCEPTS
Apache Cassandra
case study
NOSQL CONCEPTS
Miriam Antona
So ware engineer
Apache Cassandra - overview
Open-source
NOSQL CONCEPTS
Apache Cassandra - features
Distributed
Data is distributed across the nodes of the cluster
No master node
High availability
NOSQL CONCEPTS
Apache Cassandra - features
Cassandra Query Language (aka CQL)
Query data
no foreign keys
no subqueries, etc.
NOSQL CONCEPTS
Apache Cassandra - ecosystem
Third-party Cassandra projects, tools, products, and services
Cloud o erings
Installation tools
Developers' frameworks
Connectors
etc.
NOSQL CONCEPTS
Apache Cassandra - customers
NOSQL CONCEPTS
Bigmate case study - overview
Location tracking
Industrial sensor
Productivity
NOSQL CONCEPTS
Bigmate case study - problem and solution
IoT platform:
Ingests and processes large volumes of di erent data
Application examples:
Thermy -> capture the skin temperature of people
Scaled be er
NOSQL CONCEPTS
Bigmate case study - results
Millions of operations of concurrent users
NOSQL CONCEPTS
Bigmate case study - results
Millions of operations of concurrent users
1 h ps://cassandra.apache.org/case-studies/
NOSQL CONCEPTS
Let's practice!
NOSQL CONCEPTS