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!
Make sure you're interview-ready with Exponent's system design interview prep course: bit.ly/3P2tvBy
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.
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.
SQL databases can also scale horizontally as well. People could get in trouble during the interview, please clarify this point
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.
Hey WaliSayed! Thanks for adding on and sharing your knowledge!
Thank you for the amazing video. I now understand it better than I used to.
Well Exaplanation ma'am❤! Now I've understood differences b/w SQL and NO-SQL. Thank you ❤
Very precise to the points of differneces between sql and nosql. thanks for the good content as always❤
Great overview. Thanks for sharing.
So much valuable information in only 4 minutes
I regard you as a very credible and lucid presenter.
Very informative and quick 😊
@1:12 MongoDB is also ACID-compliant after version 4.
Amazing! thanks for sharing
Well &Cool explanation
❤thank you for this video
This was great thanks :).
Thank you!
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.
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.
thank you 👍
Awesome!
so, is it a standard answer the the question of "Could you tell the difference between SQL and NoSQL"?
There's not exactly one to choose. They both have use cases in which they're best in that category/
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.
why dint you cover CID(consistency, Isolation and Durrability) for sql? why only atomicity you explained?
good 👍👍
Great
Also share some examples
this is good, but too many technical jargons... so, some details mentioned here are not clear
How to convert db NoSQL to SQL DB?
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!
I got from the video that there's very few weak points for NoSQL
🙏👍
Guys , is this an actress as well ?
Our hosts are always real tech employees. In this case, a former ML engineer turned technical product manager.