Types of Databases | Criteria to choose the best database in the System Design Interview

  Рет қаралды 16,650

Think Software

Think Software

Күн бұрын

One of the most important things in a System Design interview is to choose the best database for the right use case. In this video we are discussing what are the different types of databases, what are different criteria to choose the best database for your service and how to choose the best database for your service during system design interview.
00:00 - Introduction & why choosing the best database is important in system design
02:05 - Different criteria to choose the best database in the system design interview
08:20 - Common types of databases
25:42 - Example of choosing the best database for tiny URL service.
29:38 - Example of choosing the best database for a social graph service
30:50 - Summary of choosing the best database
34:31 - Final Remarks
Distributed System Design Interviews Bible | Best online resource for System Design Interview Preparation is now online. Please visit: www.thinksoftwarelearning.com?KZfaq-database-types
Please follow me on / think.software.community if you like to get notified about new course chapters getting added or any other updates. I will also take your suggestions there about the course and the channel.
Check out our following articles:
- How to Ace Object-Oriented Design Interviews: / how-to-ace-object-orie...
- Elevator System Design - A tricky technical interview question: / elevator-system-design...
- System Design of URL Shortening Service like TinyURL: / tinyurl-design-from-th...
- File Sharing Service Like Dropbox Or Google Drive - How To Tackle System Design Interview: / how-to-tackle-system-d...
- Design Twitter - Microservices Architecture of Twitter Service: / design-twitter-microse...
- How to Effectively Use Mock Interviews to Prepare for FAANG Software Engineering Interviews: / how-to-effectively-use...
- Robinhood Backend System Design - How to receive realtime stock updates: / robinhood-backend-syst...
- Payment Gateway System Design - How does the Stripe work: / payment-gateway-system...
- Grokking the Product Design vs. System Design Interviews: / grokking-the-product-d...
- Selecting the best database for your service: / selecting-the-best-dat...
#SystemDesign #DistributedSystems #FAANG #Facebook #Google #Amazon #Apple #Microsoft #Uber #Netflix #Oracle #Lyft #Interview #ComputerProgramming

Пікірлер: 48
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Please let me know if you find the video useful. Thanks :)
@maxkolchinsky9544
@maxkolchinsky9544 Жыл бұрын
I found your channel from reading a medium article about payments system design. I am very happy I did! The video was super informational and really helped me understand some things that did not sit well with me. Thank you for your great effort and keep making those videos!
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Thank you for your comment :)
@anujymnit71
@anujymnit71 Жыл бұрын
Wow what a content, welcome back sir.............
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Thanks for the comment :)
@ronaldboodram8563
@ronaldboodram8563 Жыл бұрын
liked and subscribed!
@krishmm840
@krishmm840 Жыл бұрын
Thank you. Good content.
@ThinkSoftware
@ThinkSoftware Жыл бұрын
You are welcome 🙂
@andriidanylov9453
@andriidanylov9453 Жыл бұрын
Appreciate. Very useful video. 👍
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Thanks for the comment :)
@StellasAdi18
@StellasAdi18 Жыл бұрын
Great Video. Love your series Questions about Columnar my 2 cents: 1. Why for analytic work load: it’s due to query pattern where we scan/read all or large no of rows for specific column. Databases are chosen with the assumption that the situation warehousing analytics are read only, and rarely does the situation arise where users have to read and write many attributes in the same table. 2. Why compression: For a given column we run aggregation quarries like MIN, MAX, SUM, COUNT, and AVG … To help these perform quickly we go with compression. In addition for a given column, no of distinct values are less. So operational cost pov, this is good.
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Thanks for the comment 😊
@TheSudh123456
@TheSudh123456 Жыл бұрын
awesome explanation sir. Very informative.
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Thanks for the comment 😊
@mnchester
@mnchester Жыл бұрын
Thanks, this was a great video!! Liked. Can you please make a condensed version of this video? Basically something to quickly watch before going into a system design interview
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Thanks for the comment. In that case you should look at the medium article and for more indepth details check the course.
@mahanteshambali
@mahanteshambali Жыл бұрын
Very informative video, thank you for your efforts. One small suggestion, this video has lot of very small frames stitched together I think. If you could make longer video chunks in one go it and then join them it would be helpful.
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Thanks for the suggestion.
@garyp20
@garyp20 5 ай бұрын
It will be nice to show how the records in each db looks like in your video. It will help to digest your content.
@abhayxfactor
@abhayxfactor Жыл бұрын
Storing the same data of the same data types together allows for the data to be highly compressed, and this equals better performance with column based databases.
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Correct and thanks for the comment
@MrGottain
@MrGottain Жыл бұрын
G8 video, thanks for posting such contents. 1. Weather a RDS can be distributed ? yes it can be shading, master - slave are example for the same 2. Column data base is performant in accessing column data, why ? Please suggest. 3. Column data base achieve better compression because there are possibilities that same values may appear in multiple data sets for a column. 4. Column data base are used in analytics purposes as it is possible to extract individual column data which is required for analysis, Instead of whole row.
@pratiyushpushkar5283
@pratiyushpushkar5283 4 ай бұрын
I have a doubt in your first reply . How master -slave replicas is sharding . Arent they just same data replicated over different instances for High Availability ? Isnt sharding means keeping one part of large data over multiple instance / data sources ? @ThinkSoftware can please clarify on this ?
@ThinkSoftware
@ThinkSoftware 4 ай бұрын
Master slave replica is not sharding.
@arunavhkrishnan4932
@arunavhkrishnan4932 Жыл бұрын
Relational Databases can be Distributed or not ? - The mail issue here will be maintaining the ACID properties over the network. For ex: It would be required to lock all the row values involved in the transaction over all the distributed nodes + get the acknowledgement that all the rows are blocked for read and write -> Followed by an update + acknowledgement of update -> Followed by unlock for making the row value usable again. This in itself defeats the purpose of having a distributed system. So, theoretically it might be possible (borderline impossible) but do we achieve anything good out of it ? So much overhead. We would also need to handle a lot of corner cases for example : all the nodes which were down during a transaction would need to sync up in real time before becoming usable again. Therefore, I doubt replication (an important characteristic of distributed system which reduces latency and increases availability) can be achieved for writes. For Sharding : Cross shard transactions would require some coordination mechanism. Sharding can be done in a way to minimize cross shard transactions. Databases can be manually shard but they still do not utilise all the advantages of a distributed system.
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Thanks for the comment
@arunavhkrishnan4932
@arunavhkrishnan4932 Жыл бұрын
@@ThinkSoftware Please let us know your answer. It ll help us.
@ankitarora4437
@ankitarora4437 Жыл бұрын
We can create Secondary Index in DynamoDB so what do you mean when you say that Key-Value stores are opaque to what value we store? What's the difference between key Value store and Document DB exactly?
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Dynamo db is not strictly key value store. It is document store as well and that is why provide secondary indexes. For more information, check docs.aws.amazon.com/whitepapers/latest/comparing-dynamodb-and-hbase-for-nosql/data-models.html
@piyushmathpal4244
@piyushmathpal4244 Жыл бұрын
Thanks, good content! Question: If scalability is a concern, users don't generally opt for RDMS. WHY? We can perform HORIZONTAL sharding on a RDBMS(maybe partitioning by RANGE or USERID) and store it in multiple nodes(via consistent hashing), how come RDBMS not scale-friendly?
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Thanks for the comment. RDBMS can be sharded but this needs to be done explicitly/manually. This incurs additional complexity because you then have to give up on different constraints that RDBMS provide support for. Also, if you have to add additional shards (resharding), this adds additional level of complexity.
@abhijitkhopkar1500
@abhijitkhopkar1500 10 ай бұрын
@@ThinkSoftware There are storage foundations available for RDBMS taking care of all this and making it distributed and decently scalable. Dsitributed SQL is going to give a fresh lease of life to RDBMS solutions. Alas, for giving this solution in order to preserve ACID properties I got rejected in an interview.
@KapilSharma-zv5oo
@KapilSharma-zv5oo Жыл бұрын
Q: Relational Databases can be Distributed or not ? Yes, they can be distributed using primary-secondary or leader-follower models. AWS RDS offers distributed relational db service
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Thanks for the comment :)
@pareshbijvani4512
@pareshbijvani4512 Жыл бұрын
What are example of NewSQL of Distributed SQL Databases?
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Cockroachdb, spanner etc.
@muhammadmehdi1304
@muhammadmehdi1304 Жыл бұрын
Can u make video on Roadmap to System design expert .
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Thanks for the comment. I didn't get the question. Are you asking to make a video about how to improve your system design skills?
@rjphotos2393
@rjphotos2393 Жыл бұрын
I don’t agree with any of the SQL points: 1. Nowadays, a lot of sql databases provide auto shading. 2. Changing schema is true for most of the usse cases, right? So by your logic, no one should use SQL if there is a possibility of scheme change?
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Those are a new class of databases called NewSql which support autosharding (covered in detail in the course). But traditional relational databases don't support auto sharding. Let me know which traditional relational database supports auto sharding? Also, regarding schema changes, where did I mention that relational databases should not be used? I only discussed that it is tricky because changing schema requires some thinking and a bit complex process to tackle schema changes on a live data comprising schema changes in the database and app development. And thus we need to weigh for scenarios where a lot of schema changes are expected. So again, it is not a simple decision tree but a decision matrix to weigh different type of databases.
@rjphotos2393
@rjphotos2393 Жыл бұрын
@@ThinkSoftware Makes sense. Thank you!
@anujymnit71
@anujymnit71 Жыл бұрын
Can you increase the frequency of videos ,
@ThinkSoftware
@ThinkSoftware Жыл бұрын
I will try. Usually making a video takes on average 2 weeks to do research, then 2/3 hours for the video and then 3/4 hours for video editing. I will see how can I give more time to it with my busy job at work and home with a new baby.
@rajtiwari665
@rajtiwari665 Жыл бұрын
@@ThinkSoftware you are making great content, take your time and take care your baby!
@jollyjitesh
@jollyjitesh 11 ай бұрын
Your lisp, multiple cuts in editing and fast moving on topics made it difficult to grasp. Many topics like ACID, CAP ...etc need more clear explaination.
@LuBrown
@LuBrown Жыл бұрын
accent is real heavy. 9 min. intro? need more visual aids for this topic
@ThinkSoftware
@ThinkSoftware Жыл бұрын
Thanks for the comment
Женская драка в Кызылорде
00:53
AIRAN
Рет қаралды 434 М.
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 81 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:26
CRAZY GREAPA
Рет қаралды 15 МЛН
Choosing a Database for Systems Design: All you need to know in one video
23:58
Master's Degrees to Avoid in The UK | Worst Masters Degrees in The UK
5:32
SharpGrad Careers- Study Abroad Wiser and Smarter
Рет қаралды 526
How to Crack Any System Design Interview
8:19
ByteByteGo
Рет қаралды 345 М.
Which Database Model to Choose?
24:38
High-Performance Programming
Рет қаралды 47 М.
Design a Payment System - System Design Interview
31:40
High-Performance Programming
Рет қаралды 440 М.
Женская драка в Кызылорде
00:53
AIRAN
Рет қаралды 434 М.