What’s the difference between MySQL and Cassandra??
MySQL and Cassandra are two representatives of different kinds of databases.
MySQL is, like e.g. PostgreSQL or OracleDB, a relational database: Data is stored in tables which can have relations with each other. The data can be accessed by a structured query language (SQL, sometimes pronounced “ess queue el”, sometimes “sequel”), a standard which has evolved since the 50s/60s.
Cassandra is, like e.g. MongoDB, a different kind of database. These non-relational databases are a newer development. They are optimized for speed, efficiency and incomplete data, not so much for retrieving very complex information distributed over many tables.
There is still no standard language to access and manipulate data in non-relational databases: Every system has its own language, though it often resembles SQL.
When it comes to choose the right system, there is no better or worse: It depends very much on the task, you want to implement.
If you have a huge collection of things with relatively little specific information about each item, then you should probably choose a non-relational type of database.
If you have a smaller collection of things with a lot of specific information about each item, then the traditional relational type of database, is probably your friend.
I’m not a DB expert, but I have lots of experience with PostgreSQL and a bit of experience here and there with different types of NoSQL (usually embedded).
I must say that I personally find NoSQL databases just way simpler, way easier to comprehend and therefore way easier to work with and build on. It’s still tough for me to sometimes “think in SQL”, as in modelling your data models in a way that fits the relational database structure. Sure, you always see examples online, showing customers and how much they spent, etc. However, this is not the only type of model you want to save in a database. There are millions of models that do not even come close to a table structure and yet, they need to be often put into a SQL database, like Postgres, just because “we have been using it since ever, so we use it now for this, too”. This means, that you sometimes need to simplify or sometimes dumb down or usually complicate your models to a less optimal structure, just to appease the demands of the SQL structure. It implies so many restrictions.
However, in my opinion, NoSQL is finally freedom. You can do whatever the fuck you want and NoSQL just accepts it, as if it were part of your programming language, instead of some alien making incomprehendable demands.
So, if I have the choice, I tend to choose a NoSQL database, independent of the situation at hand, because it’s stress-free and you aren’t forced to think in grids, rows and columns.