CrazyEngineers
  • Why are noSQL DBs faster than relational DBs?

    Kaustubh Katdare

    Administrator

    Updated: Oct 26, 2024
    Views: 1.3K
    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.
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Jash Mota

    MemberJun 20, 2016

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • manishks

    MemberJul 28, 2016

    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. 😀
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register