SQL vs. NoSQL Explained (in 4 Minutes)

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 มิ.ย. 2024
  • Make sure you're interview-ready with Exponent's system design interview prep course: bit.ly/3P2tvBy
    Get our database cheatsheet: www.tryexponent.com/blog/syst...
    Trying to decide between SQL and NoSQL for your next project or system design interview? Learn about well-structured data, ACID compliance, and horizontal scaling considerations.
    The strengths of SQL databases include their relational nature, well-structured data, and ACID compliance. Still, they could be more effective for storing and querying unstructured data and challenging to scale horizontally.
    NoSQL databases are more flexible and better suited for storing unstructured data, with horizontal scaling made easier by distributed databases. However, NoSQL databases can suffer from eventual consistency issues in write-heavy systems.
    Chapters (Powered by ChapterMe) -
    00:00 - Choosing databases in system design interviews
    00:40 - SQL database strengths and weaknesses
    01:43 - SQL databases take longer to set up, scale, query
    02:13 - Benefits of simpler databases
    02:53 - Tradeoff between strong database consistency and scalability
    03:44 - Database techniques and exponents summary
    Watch more system design videos here:
    - Meta engineering manager answers a rate limiter interview question: • System Design Mock Int...
    - Google SWE answers an algorithms interview question: • Google Software Engine...
    - Google TPM answers Tiktok system design interview question: • System Design Mock Int...
    - Flipkart EM “Design Amazon Prime Video” system design interview question: • System Design Intervie...
    👉 Subscribe to our channel: bit.ly/exponentyt
    🕊️ Follow us on Twitter: bit.ly/exptweet
    💙 Like us on Facebook for special discounts: bit.ly/exponentfb
    📷 Check us out on Instagram: bit.ly/exponentig
    📹 Watch us on TikTok: bit.ly/exponenttikttok
    ABOUT US:
    Did you enjoy this interview question and answer? Want to land your dream career? Exponent is an online community, course, and coaching platform to help you ace your upcoming interview. Exponent has helped people land their dream careers at companies like Google, Microsoft, Amazon, and high-growth startups. Exponent is currently licensed by Stanford, Yale, UW, and others.
    Our courses include interview lessons, questions, and complete answers with video walkthroughs. Access hours of real interview videos, where we analyze what went right or wrong, and our 1000+ community of expert coaches and industry professionals, to help you get your dream job and more!

ความคิดเห็น • 38

  • @tryexponent
    @tryexponent  11 หลายเดือนก่อน +4

    Make sure you're interview-ready with Exponent's system design interview prep course: bit.ly/3P2tvBy

  • @ismaeltinta6118
    @ismaeltinta6118 7 หลายเดือนก่อน +182

    I don't know but as a beginner I have noticed many of these videos LACK the most important sauce : ACTUAL USE CASES! If you would have featured examples like let's say you're building an app that does this or that for you might want to use SQL for this part of the scope BECAUSE etc... and for that part of the scope NoSQL might be preferred because etc.... There you go, I have just shared a framework for your next video lol. Thank you anyway for the content it shows the genuine interest to educate but could be better especially if you want to educate beginners.

  • @AjaySharma-me1sy
    @AjaySharma-me1sy 4 หลายเดือนก่อน +68

    I'd take two examples to give some clarity on how you apply the principles explained in the video to decide on real-life situations:
    1. Designing a social media system like Facebook. Consistency is not critical. Posts can be created and it's totally fine if they take some time to propagate to multiple users. Considering the post data will be mostly unstructured data (text/images/video) and that you will need horizontal scalability (billions of posts), you should use a no-SQL database.
    2. Designing a payment system like VISA or Mastercard. Consistency is of utmost importance while committing the transaction. If there is issue in reflecting the transaction information, it can lead to unwanted consequences and angry customers. Considering that the data is structured and you don't need multiple users to see a single transaction, you should use a SQL like database.

  • @petar55555
    @petar55555 7 หลายเดือนก่อน +38

    SQL databases can also scale horizontally as well. People could get in trouble during the interview, please clarify this point

  • @WaliSayed
    @WaliSayed 6 หลายเดือนก่อน +14

    The points mentioned are informative but add bit more clear explanation here about the horizontal and vertical scalabilities of NoSQL and SQL database systems:
    NoSQL databases are designed to scale out horizontally, meaning you can add more servers or nodes to the database cluster to handle increased data volume, traffic, or performance requirements. On the other hand, SQL databases often scale up vertically by adding more CPU, RAM, or storage capacity to a single server to handle increased demands.

    • @tryexponent
      @tryexponent  5 หลายเดือนก่อน +1

      Hey WaliSayed! Thanks for adding on and sharing your knowledge!

  • @FabioGoncalves-ry7zq
    @FabioGoncalves-ry7zq 12 วันที่ผ่านมา

    Thank you for the amazing video. I now understand it better than I used to.

  • @apnashankar
    @apnashankar 9 หลายเดือนก่อน +1

    Well Exaplanation ma'am❤! Now I've understood differences b/w SQL and NO-SQL. Thank you ❤

  • @vinaygupta2369
    @vinaygupta2369 7 หลายเดือนก่อน +4

    Very precise to the points of differneces between sql and nosql. thanks for the good content as always❤

  • @shagenhokie
    @shagenhokie 4 หลายเดือนก่อน +2

    Great overview. Thanks for sharing.

  • @abdullokhayrulloev9211
    @abdullokhayrulloev9211 11 หลายเดือนก่อน +9

    So much valuable information in only 4 minutes

  • @michaelbradley6712
    @michaelbradley6712 2 หลายเดือนก่อน

    I regard you as a very credible and lucid presenter.

  • @swapnanjalisahoo97
    @swapnanjalisahoo97 2 หลายเดือนก่อน

    Very informative and quick 😊

  • @pranavjoshi7697
    @pranavjoshi7697 3 หลายเดือนก่อน +2

    @1:12 MongoDB is also ACID-compliant after version 4.

  • @mlavinb
    @mlavinb 2 หลายเดือนก่อน

    Amazing! thanks for sharing

  • @shreyaschillal
    @shreyaschillal 24 วันที่ผ่านมา

    Well &Cool explanation

  • @bigbigdog
    @bigbigdog 11 หลายเดือนก่อน +2

    ❤thank you for this video

  • @TTomni
    @TTomni 3 หลายเดือนก่อน

    This was great thanks :).

  • @native-nature-video
    @native-nature-video 9 หลายเดือนก่อน +1

    Thank you!

  • @Deepakkumar-dy1en
    @Deepakkumar-dy1en 9 หลายเดือนก่อน +10

    Its very informative video ❤.
    But it could be better to add few use cases to use sql vs nosql in system design context.
    I think:
    Use sql db if acid property, more relational data and less need of scalability is there else use nosql db.
    Correct me if i am wrong.

  • @TecDM_EC89
    @TecDM_EC89 หลายเดือนก่อน

    I have never needed to implement a NoSQL database since I normally design my datasets correctly before development.
    When I tried to learn about NoSQL I found out that the lectures I was taking were leading me to "replicate" a relational structure in a NoSQL database.
    But, that's just my case. I can tell that everything will depend on the context.

  • @mvlinux
    @mvlinux 9 หลายเดือนก่อน

    thank you 👍

  • @jacobsimon4699
    @jacobsimon4699 11 หลายเดือนก่อน

    Awesome!

  • @jasonl412
    @jasonl412 11 หลายเดือนก่อน +7

    so, is it a standard answer the the question of "Could you tell the difference between SQL and NoSQL"?

    • @michaelai8274
      @michaelai8274 11 หลายเดือนก่อน +1

      There's not exactly one to choose. They both have use cases in which they're best in that category/

  • @zhonglin5985
    @zhonglin5985 3 หลายเดือนก่อน +1

    I don't think the video has explained why SQL databases usually can't horizontally scale for write-heavy systems. This statement can be easily challenged by the interviewers. Actually MySQL database has been proven be to able to horizontally scale for writes using sharding.

  • @VishalGupta-mn2mn
    @VishalGupta-mn2mn หลายเดือนก่อน

    why dint you cover CID(consistency, Isolation and Durrability) for sql? why only atomicity you explained?

  • @AYJ959
    @AYJ959 8 หลายเดือนก่อน

    good 👍👍

  • @ashishgupta3247
    @ashishgupta3247 3 หลายเดือนก่อน

    Great

  • @klawtawar
    @klawtawar 11 หลายเดือนก่อน +1

    Also share some examples

  • @HemanthChandra
    @HemanthChandra 11 หลายเดือนก่อน +8

    this is good, but too many technical jargons... so, some details mentioned here are not clear

  • @jayakumar2927
    @jayakumar2927 2 หลายเดือนก่อน

    How to convert db NoSQL to SQL DB?

    • @tryexponent
      @tryexponent  2 หลายเดือนก่อน

      It's tricky because converting a NoSQL database to SQL requires defining a structured, relational schema that matches the unstructured data in NoSQL, which may vary significantly in format. I think you may want to evaluate whether SQL or NoSQL is more suitable for your application's needs and requirements before switching. Hope this helps!

  • @ethereal_mantis5755
    @ethereal_mantis5755 6 หลายเดือนก่อน +1

    I got from the video that there's very few weak points for NoSQL

  • @mrrishiraj88
    @mrrishiraj88 11 หลายเดือนก่อน

    🙏👍

  • @mohammedrezk8072
    @mohammedrezk8072 หลายเดือนก่อน +2

    Guys , is this an actress as well ?

    • @tryexponent
      @tryexponent  หลายเดือนก่อน +1

      Our hosts are always real tech employees. In this case, a former ML engineer turned technical product manager.