C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
Cassandra Data ModelData model in Cassandra is totally different from normally we see in RDBMS. Let's see how Cassandra stores its data. ClusterCassandra database is distributed over several machines that are operated together. The outermost container is known as the Cluster which contains different nodes. Every node contains a replica, and in case of a failure, the replica takes charge. Cassandra arranges the nodes in a cluster, in a ring format, and assigns data to them. KeyspaceKeyspace is the outermost container for data in Cassandra. Following are the basic attributes of Keyspace in Cassandra:
1) Simple strategy (rack-aware strategy) 2) old network topology strategy (rack-aware strategy) 3) network topology strategy (datacenter-shared strategy)
In Cassandra, a well data model is very important because a bad data model can degrade performance, especially when you try to implement the RDBMS concepts on Cassandra. Cassandra data Models RulesData Modeling GoalsYou should have following goals while modeling data in Cassandra:
In the case of many partitions, all these partitions need to be visited for collecting the query data. It does not mean that partitions should not be created. If your data is very large, you can't keep that huge amount of data on the single partition. The single partition will be slowed down. So you must have a balanced number of partitions.
Next TopicCassandra vs hbase
|