#100DaysOfCode Day 2: Cassandra Query Language

Databases can be an interesting topic to study.

TL;DR
This article is what I learn in today’s challenge about CQL and CassandraDB.

1. Introduction
2. CQL vs SQL
2.1 Data Model
2.2 Query Syntax
2.3 Schema definition
3. Final Considerations


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Daniel Reis

Databases can be an interesting topic to study.

TL;DR
This article is what I learn in today's challenge about CQL and CassandraDB.

  • 1. Introduction
  • 2. CQL vs SQL
  • 2.1 Data Model
  • 2.2 Query Syntax
  • 2.3 Schema definition
  • 3. Final Considerations

1. Introduction

My second day of #100daysofcode studies was into Cassandra Query Language (CQL). Since I started to study about ScyllaDB, I should focus to learn CQL and probably pass through this "rabbit hole" of databases.

2. CQL vs SQL

CQL (Cassandra Query Language) and SQL (Structured Query Language) are both query languages used to interact with databases, but they have some significant differences. Here are some of the major differences between CQL and SQL.

2.1 Data model

SQL is based on the relational data model, which organizes data into tables with defined columns and relationships between them. CQL is based on the column-family data model, which organizes data into columns grouped by column families or tables. This data model allows for more flexibility in data modeling and querying.

2.2 Query syntax

While CQL has a syntax similar to SQL, there are some key differences. For example, CQL uses a SELECT * FROM statement to query all rows in a table, and uses a WHERE clause to filter data. CQL also supports additional features such as collections, which allow for the storage of multiple values within a single column.

2.3 Schema definition

In SQL, the schema for a database must be defined before any data can be added to the tables. In CQL, the schema can be defined on the fly as data is added to the database. This allows for more flexibility in data modeling and makes it easier to adapt to changing data requirements.

3. Final Considerations

I didn't have so much time today to go further into this studies but there's a few topics that probably I'll be going deeper on the next days.

Don't forget to stay hydrated and see you tomorrow's daily post!


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Daniel Reis


Print Share Comment Cite Upload Translate Updates
APA

Daniel Reis | Sciencx (2023-02-22T00:34:34+00:00) #100DaysOfCode Day 2: Cassandra Query Language. Retrieved from https://www.scien.cx/2023/02/22/100daysofcode-day-2-cassandra-query-language/

MLA
" » #100DaysOfCode Day 2: Cassandra Query Language." Daniel Reis | Sciencx - Wednesday February 22, 2023, https://www.scien.cx/2023/02/22/100daysofcode-day-2-cassandra-query-language/
HARVARD
Daniel Reis | Sciencx Wednesday February 22, 2023 » #100DaysOfCode Day 2: Cassandra Query Language., viewed ,<https://www.scien.cx/2023/02/22/100daysofcode-day-2-cassandra-query-language/>
VANCOUVER
Daniel Reis | Sciencx - » #100DaysOfCode Day 2: Cassandra Query Language. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/02/22/100daysofcode-day-2-cassandra-query-language/
CHICAGO
" » #100DaysOfCode Day 2: Cassandra Query Language." Daniel Reis | Sciencx - Accessed . https://www.scien.cx/2023/02/22/100daysofcode-day-2-cassandra-query-language/
IEEE
" » #100DaysOfCode Day 2: Cassandra Query Language." Daniel Reis | Sciencx [Online]. Available: https://www.scien.cx/2023/02/22/100daysofcode-day-2-cassandra-query-language/. [Accessed: ]
rf:citation
» #100DaysOfCode Day 2: Cassandra Query Language | Daniel Reis | Sciencx | https://www.scien.cx/2023/02/22/100daysofcode-day-2-cassandra-query-language/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.