No announcement yet.

My SQL vs Cassandra.

  • Filter
  • Time
  • Show
Clear All
new posts

  • My SQL vs Cassandra.

    Has anyone used Cassandra? Pros/cons?

  • #2
    Depends on what you need to use it for.

    High availability

    No secondary indexes
    No sorting, grouping or other advanced queries
    Hardly any filtering
    No synchronous behaviour of updates
    No bulk updates (UPDATE 10,000 rows in one operation)
    No efficient table creation / drop

    Some more about the pro's from another website.
    High availability
    Cassandra tolerates the failure of some nodes and will continue to read data and take writes despite some nodes being offline or unreachable - the exact behaviour depends on its settings and what consistency level of read/write is requested.

    Write scaling
    Cassandra allows you to scale writes by just adding more nodes; writes are split between nodes, hence you can generally get better and better write performance by JUST adding more nodes (NB: it doesn't necessarily do load balancing, so you might not in all cases, but this is what it aspires to)

    Read scaling
    Cassandra gives you read-scaling in the same way as write-scaling. This is a good thing, but can also be achieved relatively easily* with a conventional database by adding more and more read-only slaves / replicas, or using a cache (if you tend to get a lot of similar requests). Many big MySQL users do both.


    • #3
      Really this depends on what the scope of your application(s) are and how much overhead you need.

      If you are writing small applications that need self contained storage I'd highly recommend SQLite


      • #4
        I never heard about Cassandra,, MySql is better than anything else


        • #5
          Originally posted by Sigma View Post
          I never heard about Cassandra,, MySql is better than anything else
          What makes you prefer MYSQL over SQL? I have used both now, and admittedly i have used SQL more, just cause im more into .NET and the frameworks seem more compatable... saying that.. at the moment I am using MySQL with JAVA atm and it seems just the same although Im not aloud to use a framework :-( so makes it annoying as having to make my own dynamic statments which is pretty interesting


          • #6
            It's different things.. it's a key value based DB.

            In this case I would go with


            • #7
              This comparison isn't exactly apples-to-apples. MySQL performs atomic operations -- thus, increased security and reliability. However, it's a relational database and comparatively slow.

              Cassandra is along the lines of the new NoSQL trend, whereby databases implement very simple key/value stores and don't rely on costly SQL operations. They're very lightweight and can throughput pretty crazy amounts. If you're considering Cassandra, I'd encourage you to look at MongoDB. In my opinion, it's probably the best NoSQL database out there right now. There are benchmarks galore that compare the performance of all of these databases.

              In the end, the choice of a database is the typical computer science trade-off between time and space, with the added parameter of security. For database operations that require the up-most reliability (say, financial transaction records), you might want to look at MySQL. If you don't need this guaranteed reliability (you're writing thousands of records per hour/minute/second and missing data isn't necessarily the end of the world), definitely take a look at MongoDB, Cassandra, and Redis.


              • #8
                I couldn't agree with Xiode more - I love mysql myself especially when your database fits in memory and you pair it with memcache you can serve some quick stuff up - looked at cassandra but it seems a little hardcore for me at the moment - when mysql stops being able to handle what I throw at it I'll look again at whaqtever nosql system is popular


                • #9
                  Re: My SQL vs Cassandra.

                  Seems I have a lot to explore in this forum. Sorry for side tracking but didn't expect such a loaded question here.

                  MySql is a RDBMS which with InnoDB storage is ACID compliant. Cassandra is a massively distributed database with a different sets of priority. Contrary to what some others said, its not even to match with MongoDB or CouchDB who are distributed document database. As far as I understand its a different beast. Here's my very basic take

                  MySql -- rigid, low changing schema, fixed across all rows in a table. ACID compliant .. not scalable horizonally without massive application logic/work like sharding.
                  CouchDB/MongoDB -- horizonally scalable, no schema (each document can contain whatever fields), get by key and some indexing features, different set of consitentcy/durability preference than MySql.
                  Cassandra -- in the middle. It allows for a semi rigid schema much more flexible than mysql while not as open as couchDB. Its meant to scale to the degree or more than the document databases and to support more complex query.

                  There's two reason you go to a NoSql situation. You have a simple application that works on documents/objects and does simple querying .. litlte reporting etc. If so you might wanna explore CouchDB/MongoDB and also you might have a scaling requirement. Cassandra I felt is much more invasive and complex and is really meant for scenarios where you seem to have exhauseted other options.

                  Looking forward to soem comments from some real expert on the subject.