SlideShare a Scribd company logo
1 of 15
Amirhossein Saberi
May 2016
CASSANDRA NAME
A daughter of the Trojan king Priam, who was given the gift of prophecy by Apollo. When she cheated him,
however, he turned this into a curse by causing her prophecies, though true, to be disbelieved.
RDBMS VS NOSQL
Vertical scaling Horizontal scaling
WHAT'S WRONG WITH RELATIONAL DATABASE?
ACID GUARANTEE TRANSACTIONS ARE PROCESSED
• Atomic: Atomic means “all or nothing”
• Consistent: Consistent means that data moves from one correct state to another correct state
• Isolated: Isolated means that transactions executing concurrently will not become entangled with each
• other
• Durable: Once a transaction has succeeded, the changes will not be lost
INTRODUCTION
• Original authors: Avinash Lakshman, Prashant Malik
• Developer: Apache Software Foundation (Initially developed by Facebook to power their Inbox Search feature)
• Initial release: 2008
• Stable release: 3.4 / March 8,2016
• Written in: Java
• Type: Database / NoSQL
• License: Apache License 2.0 (permissive free software license)
Apache Cassandra is an open source distributed database management system designed to handle
large amounts of data across many commodity servers, providing high availability with no single
point of failure.
MAIN FEATURES
• Decentralized: Data located, stored, and maintained in a single
location
• Supports replication and multi data center replication
• Scalability (Elastic Scaling)
• Fault-tolerant
• Tunable consistency: Strong consistency or eventual?
• MapReduce support: programming model and an
associated implementation for processing and generating
large data sets with a parallel, distributed algorithm on a
cluster.
• Cassandra Query language (CQL)
• Fast write
WHAT PROBLEM DO YOU HAVE?
RDBMS, NoSQL. The horse, the car, the plane. They each build on prior art, they each
attempt to solve certain problems, and so they’re each good at certain things—and less
good at others. They each coexist, even now.
Do u need to fully support transactions with ACID guarantee?
Do u need to have high availability and horizontal scalability?
CAP THEOREM
• Consistency (all nodes see the same data at the same time - every read would get you the most recent
write)
• Availability (a guarantee that every request receives a response about whether it succeeded or failed)
• Partition tolerance (the system continues to operate despite arbitrary partitioning due to network
failures)
CASSANDRA IN CAP
DATA MODEL
MySQL Cassandra
REPLICATION
• Simple Strategy: Specifies a simple replication factor for the cluster.
• Network Topology Strategy: Using this option, you can set the
replication factor for each data-center independently.
• Old Network Topology Strategy: This is a legacy replication strategy.
INSTALLATION
1. Download & Install JAVA
2. Download & Install Cassandra
COMMANDS
[saberi@linux bin]$ cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native protocol v3]
Use HELP for help.
cqlsh>
- CREATE KEYSPACE “KeySpace Name WITH replication = {'class': ‘Strategy name’, 'replication_factor' : ‘No.Of replicas’};
- CREATE TABLE tablename(
column1 name datatype PRIMARYKEY,
column2 name data type,
column3 name data type.
)
- INSERT INTO <tablename>
(<column1 name>, <column2 name>....)
VALUES (<value1>, <value2>....)
USING <option>
- SELECT FROM <tablename>
REFERENCES
• http://robertgreiner.com/2014/06/cap-theorem-explained/
• https://en.wikipedia.org/wiki/CAP_theorem
• https://dzone.com/articles/better-explaining-cap-theorem
• http://www.tutorialspoint.com/cassandra/cassandra_read_data.htm
• https://en.wikipedia.org/wiki/Apache_Cassandra
• http://www.datastax.com/nosql-databases
• http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis
• http://www.datastax.com/2011/09/cassandra-for-enterprise-tuneable-consistency-its-your-choice

More Related Content

Similar to Apache Cassandra Database 2016

Migrating Oracle database to Cassandra
Migrating Oracle database to CassandraMigrating Oracle database to Cassandra
Migrating Oracle database to CassandraUmair Mansoob
 
A Helmsman meets a Daughter of Troy - The introduction of Kubernetes and Cass...
A Helmsman meets a Daughter of Troy - The introduction of Kubernetes and Cass...A Helmsman meets a Daughter of Troy - The introduction of Kubernetes and Cass...
A Helmsman meets a Daughter of Troy - The introduction of Kubernetes and Cass...Chris Love
 
04-Introduction-to-CassandraDB-.pdf
04-Introduction-to-CassandraDB-.pdf04-Introduction-to-CassandraDB-.pdf
04-Introduction-to-CassandraDB-.pdfhothyfa
 
cassandra_presentation_final
cassandra_presentation_finalcassandra_presentation_final
cassandra_presentation_finalSergioBruno21
 
An Overview of Apache Cassandra
An Overview of Apache CassandraAn Overview of Apache Cassandra
An Overview of Apache CassandraDataStax
 
A Microservices approach with Cassandra and Quarkus | DevNation Tech Talk
A Microservices approach with Cassandra and Quarkus | DevNation Tech TalkA Microservices approach with Cassandra and Quarkus | DevNation Tech Talk
A Microservices approach with Cassandra and Quarkus | DevNation Tech TalkRed Hat Developers
 
Cassandra Distributions and Variants
Cassandra Distributions and VariantsCassandra Distributions and Variants
Cassandra Distributions and VariantsAnant Corporation
 
Appache Cassandra
Appache Cassandra  Appache Cassandra
Appache Cassandra nehabsairam
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Aws for Startups Building Cloud Enabled Apps
Aws for Startups Building Cloud Enabled AppsAws for Startups Building Cloud Enabled Apps
Aws for Startups Building Cloud Enabled AppsAmazon Web Services
 
Latency and Consistency Tradeoffs in Modern Distributed Databases
Latency and Consistency Tradeoffs in Modern Distributed DatabasesLatency and Consistency Tradeoffs in Modern Distributed Databases
Latency and Consistency Tradeoffs in Modern Distributed DatabasesScyllaDB
 
Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017
Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017
Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017Codemotion
 
CASSANDRA A DISTRIBUTED NOSQL DATABASE FOR HOTEL MANAGEMENT SYSTEM
CASSANDRA A DISTRIBUTED NOSQL DATABASE FOR HOTEL MANAGEMENT SYSTEMCASSANDRA A DISTRIBUTED NOSQL DATABASE FOR HOTEL MANAGEMENT SYSTEM
CASSANDRA A DISTRIBUTED NOSQL DATABASE FOR HOTEL MANAGEMENT SYSTEMIJCI JOURNAL
 

Similar to Apache Cassandra Database 2016 (20)

Migrating Oracle database to Cassandra
Migrating Oracle database to CassandraMigrating Oracle database to Cassandra
Migrating Oracle database to Cassandra
 
A Helmsman meets a Daughter of Troy - The introduction of Kubernetes and Cass...
A Helmsman meets a Daughter of Troy - The introduction of Kubernetes and Cass...A Helmsman meets a Daughter of Troy - The introduction of Kubernetes and Cass...
A Helmsman meets a Daughter of Troy - The introduction of Kubernetes and Cass...
 
04-Introduction-to-CassandraDB-.pdf
04-Introduction-to-CassandraDB-.pdf04-Introduction-to-CassandraDB-.pdf
04-Introduction-to-CassandraDB-.pdf
 
The myth of Cassandra
The myth of CassandraThe myth of Cassandra
The myth of Cassandra
 
Apache Cassandra
Apache CassandraApache Cassandra
Apache Cassandra
 
cassandra_presentation_final
cassandra_presentation_finalcassandra_presentation_final
cassandra_presentation_final
 
An Overview of Apache Cassandra
An Overview of Apache CassandraAn Overview of Apache Cassandra
An Overview of Apache Cassandra
 
A Microservices approach with Cassandra and Quarkus | DevNation Tech Talk
A Microservices approach with Cassandra and Quarkus | DevNation Tech TalkA Microservices approach with Cassandra and Quarkus | DevNation Tech Talk
A Microservices approach with Cassandra and Quarkus | DevNation Tech Talk
 
Cassandra Distributions and Variants
Cassandra Distributions and VariantsCassandra Distributions and Variants
Cassandra Distributions and Variants
 
Cassandra Database
Cassandra DatabaseCassandra Database
Cassandra Database
 
Cassandra tutorial
Cassandra tutorialCassandra tutorial
Cassandra tutorial
 
Why Cassandra?
Why Cassandra?Why Cassandra?
Why Cassandra?
 
Cassandra Learning
Cassandra LearningCassandra Learning
Cassandra Learning
 
NoSql Database
NoSql DatabaseNoSql Database
NoSql Database
 
Appache Cassandra
Appache Cassandra  Appache Cassandra
Appache Cassandra
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Aws for Startups Building Cloud Enabled Apps
Aws for Startups Building Cloud Enabled AppsAws for Startups Building Cloud Enabled Apps
Aws for Startups Building Cloud Enabled Apps
 
Latency and Consistency Tradeoffs in Modern Distributed Databases
Latency and Consistency Tradeoffs in Modern Distributed DatabasesLatency and Consistency Tradeoffs in Modern Distributed Databases
Latency and Consistency Tradeoffs in Modern Distributed Databases
 
Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017
Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017
Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017
 
CASSANDRA A DISTRIBUTED NOSQL DATABASE FOR HOTEL MANAGEMENT SYSTEM
CASSANDRA A DISTRIBUTED NOSQL DATABASE FOR HOTEL MANAGEMENT SYSTEMCASSANDRA A DISTRIBUTED NOSQL DATABASE FOR HOTEL MANAGEMENT SYSTEM
CASSANDRA A DISTRIBUTED NOSQL DATABASE FOR HOTEL MANAGEMENT SYSTEM
 

Recently uploaded

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Recently uploaded (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Apache Cassandra Database 2016

  • 2. CASSANDRA NAME A daughter of the Trojan king Priam, who was given the gift of prophecy by Apollo. When she cheated him, however, he turned this into a curse by causing her prophecies, though true, to be disbelieved.
  • 3. RDBMS VS NOSQL Vertical scaling Horizontal scaling
  • 4. WHAT'S WRONG WITH RELATIONAL DATABASE?
  • 5. ACID GUARANTEE TRANSACTIONS ARE PROCESSED • Atomic: Atomic means “all or nothing” • Consistent: Consistent means that data moves from one correct state to another correct state • Isolated: Isolated means that transactions executing concurrently will not become entangled with each • other • Durable: Once a transaction has succeeded, the changes will not be lost
  • 6. INTRODUCTION • Original authors: Avinash Lakshman, Prashant Malik • Developer: Apache Software Foundation (Initially developed by Facebook to power their Inbox Search feature) • Initial release: 2008 • Stable release: 3.4 / March 8,2016 • Written in: Java • Type: Database / NoSQL • License: Apache License 2.0 (permissive free software license) Apache Cassandra is an open source distributed database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure.
  • 7. MAIN FEATURES • Decentralized: Data located, stored, and maintained in a single location • Supports replication and multi data center replication • Scalability (Elastic Scaling) • Fault-tolerant • Tunable consistency: Strong consistency or eventual? • MapReduce support: programming model and an associated implementation for processing and generating large data sets with a parallel, distributed algorithm on a cluster. • Cassandra Query language (CQL) • Fast write
  • 8. WHAT PROBLEM DO YOU HAVE? RDBMS, NoSQL. The horse, the car, the plane. They each build on prior art, they each attempt to solve certain problems, and so they’re each good at certain things—and less good at others. They each coexist, even now. Do u need to fully support transactions with ACID guarantee? Do u need to have high availability and horizontal scalability?
  • 9. CAP THEOREM • Consistency (all nodes see the same data at the same time - every read would get you the most recent write) • Availability (a guarantee that every request receives a response about whether it succeeded or failed) • Partition tolerance (the system continues to operate despite arbitrary partitioning due to network failures)
  • 12. REPLICATION • Simple Strategy: Specifies a simple replication factor for the cluster. • Network Topology Strategy: Using this option, you can set the replication factor for each data-center independently. • Old Network Topology Strategy: This is a legacy replication strategy.
  • 13. INSTALLATION 1. Download & Install JAVA 2. Download & Install Cassandra
  • 14. COMMANDS [saberi@linux bin]$ cqlsh Connected to Test Cluster at 127.0.0.1:9042. [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native protocol v3] Use HELP for help. cqlsh> - CREATE KEYSPACE “KeySpace Name WITH replication = {'class': ‘Strategy name’, 'replication_factor' : ‘No.Of replicas’}; - CREATE TABLE tablename( column1 name datatype PRIMARYKEY, column2 name data type, column3 name data type. ) - INSERT INTO <tablename> (<column1 name>, <column2 name>....) VALUES (<value1>, <value2>....) USING <option> - SELECT FROM <tablename>
  • 15. REFERENCES • http://robertgreiner.com/2014/06/cap-theorem-explained/ • https://en.wikipedia.org/wiki/CAP_theorem • https://dzone.com/articles/better-explaining-cap-theorem • http://www.tutorialspoint.com/cassandra/cassandra_read_data.htm • https://en.wikipedia.org/wiki/Apache_Cassandra • http://www.datastax.com/nosql-databases • http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis • http://www.datastax.com/2011/09/cassandra-for-enterprise-tuneable-consistency-its-your-choice