Why are noSQL DBs faster than relational DBs?

My knowledge of database systems is pretty limited but in the past week; all the web pages I've read seem to indicate that noSQL databases are tad faster than relational databases. I'm not sure if it indeed is true; but if it is, I'm curious to know why?

NoSQL systems store all the data in JSON format; but I'm guessing that isn't alone the reason for the queries to run faster. Would really appreciate if someone can elaborate a bit on functioning of noSQL databases.

Replies

  • Jash Mota
    Jash Mota
    According to what I've learned so far through the web and various books, NoSQL have an edge over relational databases which contain rows and columns. The reason is that it's kind of like the old '.csv' files, which just have values separated by some character like a comma(but definitely not a comma in NoSQL's case). Hence the data structure of this implementation is much simpler, which boosts up the speed for instruction like finding out reading an element of value. It's hugely used by fb and Google these days. But they tend to bind it up with SQL for better results.

    Note-This may not be the most accurate answer. Do correct me if I'm wrong.
  • manishks
    manishks
    Well it all depends on how relational dbms and no sql databases store their data, how we retrieve those data.
    We know that relational databse has the concept of tables, columns and hence joins etc. But noSQL has no concept of any of these.
    It knows documents.

    Example: Suppose a school wants to store student data and their semester wise marks in database.

    Using Relational Database:

    Create a table named STUDENT. Insert information for each student(first name, last name, father's name, address etc.).
    Now create a tble called MARKS. Insert their semester wise marks.

    Now, their are chances that a student might not have a last name. But we do have a column for him in the table.
    Again, if I want to query the database to get a list of students who scored more than 90 in all the subjects. I would have to
    query both the tables and hence create a join.

    Using noSQL:

    No concept of table, hence no joins.
    I can store data of two students in following form.
    STUDENT[
    1{
    First_name: manish,
    Last_name: singh,
    Address: abc,
    .
    .
    },
    2{
    First_name:Rohan,
    Address: xyz,
    .
    .

    }
    ]

    access data: STUDENT[1][Last_name]===>singh
    STUDENT[2][First_name]==>Rohan.

    Clearly, we have a dynamic schema here also, data retrieval will be fast, as there is no overhead of joins creating tables etc.
    And, no sql is highly scalable as well.

    Hope it gives you guys some relevant information.

    Do correct me if I am wrong somewhere.

    Thanks. 😀

You are reading an archived discussion.

Related Posts

I've scored 83.76% in mba cet which are the best colleges for which I should apply in the cap rounds
Hello all, I have just completed my engineering and I am hired in TCS. I have given BIPM stream in my present ilp aspire course. So, could any body suggest...
Hi friends, I bought my new redmi note 3 and the first big game i wanted was fifa but fifa15 & fifa 16 were online dependant hence i opted for...
Hi guys.. I am having a hard time thinking, what would be the possible topics/proposals related to electronics about our theme "Techno-Green: Engineering a Better life towards Environmental Sustainability"? Thank...
Say hello to Sunway TaihuLight, the fastest supercomputer humans have ever seen. The new topper in the TOP500 list of global supercomputers beats the previous record holder, Tianhe-2 by the...