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

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 พ.ค. 2024
  • 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?TH-cam-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

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

  • @ThinkSoftware
    @ThinkSoftware  ปีที่แล้ว +15

    Please let me know if you find the video useful. Thanks :)

  • @maxkolchinsky9544
    @maxkolchinsky9544 ปีที่แล้ว +1

    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!

  • @anujymnit71
    @anujymnit71 ปีที่แล้ว +1

    Wow what a content, welcome back sir.............

  • @StellasAdi18
    @StellasAdi18 ปีที่แล้ว +1

    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.

  • @krishmm840
    @krishmm840 ปีที่แล้ว +1

    Thank you. Good content.

  • @andriidanylov9453
    @andriidanylov9453 ปีที่แล้ว +1

    Appreciate. Very useful video. 👍

  • @TheSudh123456
    @TheSudh123456 ปีที่แล้ว +1

    awesome explanation sir. Very informative.

  • @mnchester
    @mnchester ปีที่แล้ว +1

    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.

  • @abhayxfactor
    @abhayxfactor ปีที่แล้ว +2

    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

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

    It will be nice to show how the records in each db looks like in your video. It will help to digest your content.

  • @mahanteshambali
    @mahanteshambali ปีที่แล้ว +3

    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.

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

    liked and subscribed!

  • @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 2 หลายเดือนก่อน

      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  2 หลายเดือนก่อน +1

      Master slave replica is not sharding.

  • @arunavhkrishnan4932
    @arunavhkrishnan4932 ปีที่แล้ว +2

    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 ปีที่แล้ว +1

      @@ThinkSoftware Please let us know your answer. It ll help us.

  • @ankitarora4437
    @ankitarora4437 ปีที่แล้ว +1

    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  ปีที่แล้ว +1

      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  ปีที่แล้ว +2

      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 8 หลายเดือนก่อน

      @@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

  • @pareshbijvani4512
    @pareshbijvani4512 ปีที่แล้ว

    What are example of NewSQL of Distributed SQL Databases?

  • @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  ปีที่แล้ว +1

      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  ปีที่แล้ว +2

      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 ปีที่แล้ว +1

      @@ThinkSoftware you are making great content, take your time and take care your baby!

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

    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