- Spring Data Tutorial - Home
- Spring Data Apache Solr
- Overview
- Prerequisites
- Introduction
- What is Apache Solr?
- Getting Started
- Querying
- Features
- Conclusion
- Spring Data Cassandra
- Overview
- Prerequisites
- Introduction
- What is Cassandra?
- Getting Started
- Annotation AllowFiltering with Query Methods
- Partition and Clustering
- Coding hands-on on Partitioning and Clustering
- Features
- Conclusion
- Spring Data Couchbase
- Overview
- Prerequisites
- Introduction
- What is Couchbase?
- Getting Started
- Views
- CouchbaseTemplate
- Hands-on using CouchbaseTemplate
- Features
- Conclusion
- Spring Data Elasticsearch
- Overview
- Prerequisites
- Introduction
- What is ElasticSearch?
- Getting Started
- Querying
- Configuring ElasticsearchOperations bean
- Features
- Conclusion
- Spring Data JDBC
- Introduction
- Need of Spring Data JDBC
- Features
- Domain-Driven Design
- Prerequisites
- Getting Started
- Conclusion
- Spring Data JPA
- Background
- Introduction
- Prerequisites
- Getting Started
- Features
- Conclusion
- Spring Data MongoDB
- Overview
- Prerequisites
- Introduction
- What is MongoDB?
- Getting Started
- Query Methods
- Annotations
- Exposing REST end points
- Relationship
- Conclusion
- Spring Data Redis
- Overview
- Prerequisites
- Introduction
- What is Redis?
- Redis Java Clients
- Getting Started
- Features
- Conclusion
- Spring Data REST
- Background
- Introduction to Spring Data REST
- Prerequisites
- Getting Started
- Features
- Conclusion
- Spring Data Tutorial Useful Resources
- Spring Data Tutorial - Quick Guide
- Spring Data Tutorial - Useful Resources
- Spring Data Tutorial - Discussion
What is Cassandra
Cassandra is an open−source column−oriented NoSQL database. It is a distributed database management system that can manage large amounts of data across multiple servers. It provides high availability through data replication across multiple data−centres, which guarantees for no single point of failure. Cassandra Query Language (CQL) is its query language which is similar to SQL. To learn more about Cassandra, visit our tutorials by clicking here.
Installation Guide
Since this tutorial will be working extensively with Cassandra. Make sure it is installed on your machine, If not already installed follow our installation guide by clicking here.
Steps Post Installation
Once it is installed, we can create Keyspace. A keyspace in Cassandra is equivalent to a database in RDBMS.
Create KEYSPACE
Lets create a KESPACE named tutorials_point, using below syntax.
CREATE KEYSPACE IF NOT EXISTS tutorials_point WITH replication = {'class':'SimpleStrategy', 'replication_factor':1};
Create table
The syntax and process of creating a table in Cassandra are also similar to the RDBMS table. a table in Cassandra can be created in a KEYSAPCE. Lets move into KEYSPACE.
use tutorials_point ;
Now, create a table customer which has two fields id, and name. Use below syntax.
CREATE TABLE customer( id INT PRIMARY KEY, name text );