Relational Data Modelling | Schema Design Using Linkedin | Exclusive Tips & Tricks 2023

Поделиться
HTML-код
  • Опубликовано: 6 авг 2024
  • Our first video in our System Design Series. If you are a software engineer who often struggles in converting product description/interview requirements into low-level schema design, this video is the right one to get started with System Design. Attend a free masterclass by industry-leading experts here: www.scaler.com/events?...
    🔹About our System Design Series:
    Our System Design Series will help you become better at the skills required to transition from an entry-level engineer to Senior Engineer and eventually become a software architect. We cover a series of topics ranging from schema design, basics like CAP Theorem, Consistent Hashing, overall system design like Facebook Messenger. When you cover these topics, you will be able to intuitively come up with practical solutions to real-life problem statements at your workplace. Our exclusive video will also be able to crack system design interviews at top tech companies like Facebook and Google.
    🔹About Relational Data Modelling
    The relational model in DBMS is an abstract model used to organize and manage the data stored in a database. It stores data in two-dimensional inter-related tables, also known as relations in which each row represents an entity and each column represents the properties of the entity.
    🔹About Schema Design
    Schema design is the process of creating a blueprint for a database, specifying the tables, fields, data types, and relationships between them. It defines the structure of the database and provides guidelines for creating and maintaining the database. It helps to ensure data integrity, consistency, and performance, and allows for efficient querying and data retrieval.
    🔹About the instructor:
    Mohit Yadav (ex- Nutanix, Hotstar) is an instructor at Scaler and has built systems that handle 10M concurrent users and ingest more than 1 TB of data per day. Having cleared interviews for Senior Engineer roles at companies like Facebook, Amazon, Google, and after interviewing more than 200 candidates at Hotstar and Nutanix, Mohit decided to make this video covering the #1 skill-gap that he observed in most engineers.
    You can check his LinkedIn profile here: / mohityadav1991
    The following topics are covered in this video 👇🏼
    0:00​ Introduction
    1:14 Steps for designing Schema for Relational Database
    1:50​ Creating our 1st entity
    3:19 Modeling Many to Many relationships
    5:40​ Splitting similar entities into two tables
    9:01 Modeling One to Many relationships
    10:00​ Modelling bi-directional relationships
    11:51​ Combining two entities into one
    13:58 Conclusion
    --------------------------------------- About Scaler -------------------------------------------------
    We are a tech-focused upskilling and reskilling platform catering to tech enthusiasts in universities and working professionals. There are more Scaler graduates working at Amazon than all of the IITs combined!
    Know More about Scaler: bit.ly/3HOlI5K
    📌 Follow us on Social and be a part of an amazing tech community📌
    👉 Meet like-minded coder folks on Discord - / discord
    👉 Tweets you cannot afford to miss out on - / scaler_official
    👉 Check out student success stories, expert opinions, and live classes on Linkedin - / scalerofficial
    👉 Explore relatable memes and get access to exclusive updates on Instagram - / scaler_official
    📢 Be a part of our one of a kind telegram community: t.me/Scalercommunity
    🔔 Hit that bell icon to get notified of all our new videos 🔔
    If you liked this video, please don't forget to like and comment. Never miss out on our exclusive videos to help boost your coding career! Subscribe to Scaler now!
    ruclips.net/user/Scaler?sub_co...
    #relationalschema #schemadesign

Комментарии • 57

  • @SCALER
    @SCALER  Год назад

    Take the Hunger test today: bit.ly/3HOlI5K

  • @jiyanaadlakha
    @jiyanaadlakha 3 года назад +12

    In Education/Institution and Company tables we are storing end and start date which might not be valid for a large number of users also may not be applicate for say more than 1 user also so we can have userid as foreign key also in these tables , which states one to many relation rather than many to many relationship.

  • @ViratSingh-nq7ok
    @ViratSingh-nq7ok 2 года назад +7

    Super helpful and easy to understand. Thank you!

  • @akhilreddybandi
    @akhilreddybandi 2 года назад +3

    Nice explanation.
    Looking forward for a video on when to use SQL and when to use NO-SQL.

  • @shubhisingh8820
    @shubhisingh8820 3 года назад +1

    This was really helpful. Looking forward to more.

  • @hemachel175
    @hemachel175 3 года назад

    really helpful video. please add more videos on Schema Design

  • @saisahityadheram1271
    @saisahityadheram1271 3 года назад +1

    Quite engaging video

  • @ayyapusettynk2405
    @ayyapusettynk2405 2 года назад +1

    Really a great video and worth watching

  • @Nicetrycutiepie
    @Nicetrycutiepie 2 года назад

    looking forward more.. like this.

  • @MUSKAN0896
    @MUSKAN0896 2 года назад +1

    Your explanation was very good! Can you please make more videos with more examples? Thanks!!

  • @Nicetrycutiepie
    @Nicetrycutiepie 2 года назад

    useful, really intersting...

  • @mohdt786
    @mohdt786 2 года назад +1

    Amazing video!

  • @poojasikdar3583
    @poojasikdar3583 4 месяца назад

    Good content. Probably Entity can be a different table as well and entity IDs can be used as the reference in the other table.

  • @bharaniakella7734
    @bharaniakella7734 3 года назад +5

    This video is extremely helpful. Looking forward to more videos on Databases

  • @VeronicaSantos
    @VeronicaSantos Год назад

    Very nice example and explanations. I missed an Entity Relationship Diagram (ERD) to see the big picture.

  • @mahammadsafiq7262
    @mahammadsafiq7262 11 месяцев назад

    You made it so simple

  • @DesiTravelographer
    @DesiTravelographer 3 года назад +3

    Worth to Watch, learnt new thing today ... Thanks

    • @SCALER
      @SCALER  3 года назад +2

      Glad to hear it!

  • @venkateshkannan7398
    @venkateshkannan7398 Год назад

    Just few minutes into the video and can tell it’s going to be 🔥. Appreciate the effort , thank you!

    • @SCALER
      @SCALER  Год назад

      Thank you so much! Super glad to hear that! 🙌🏼

  • @jivanmainali1742
    @jivanmainali1742 3 года назад +1

    but in user_skill table still u have to go through all row to get all users with skill java

  • @the_silver_liningg
    @the_silver_liningg 11 месяцев назад

    That was awesome and super helpful! Thank you

    • @SCALER
      @SCALER  11 месяцев назад

      Thanks! Glad this was helpful! 😃

  • @jiyanaadlakha
    @jiyanaadlakha 3 года назад +2

    instead of calling the column_name user_id_1 , user_id_2 it will be better to say follower_user_id (foreign key (user_id ) in table user) and followed_user_id (again foreign key (user id)). Also the concept of foreign key is very imp in one to many relationships I believe.

    • @jimshtepa5423
      @jimshtepa5423 2 года назад

      what is imp?

    • @verduras
      @verduras Год назад +1

      @@jimshtepa5423 "imp" -> "important"

  • @kanchidoshi6907
    @kanchidoshi6907 2 года назад

    Can you please elaborate recommendations table again with SQL query?

  • @MohammedIrfan-gy5bv
    @MohammedIrfan-gy5bv 3 года назад +1

    Wow Presentation and UX embedded is different level... great job on these enhancements...

  • @vijaymenon5816
    @vijaymenon5816 3 года назад

    very nice video..sir can u please also talk about NoSQL databases like Document based MongoDB or Graph based OrientDB , about how the schema for these databases can be designed?

    • @SCALER
      @SCALER  3 года назад

      Sure vijay, this is one topic that we intend do soon

  • @letsexplorewithanika2642
    @letsexplorewithanika2642 3 года назад

    Nice explaination

    • @SCALER
      @SCALER  3 года назад

      Thank you so much. We will be bringing you more exclusive videos!

  • @ronakgoel4766
    @ronakgoel4766 3 года назад +1

    For query like you said : find all user_id for a particular skill type (say java) , if we go by 1st approach ( i.e. taking skills in the user profile itself), it will be a scan operation on the table size ( say 1 billion ) .
    Can you please tell, how the later method i.e. creating the user_skills mapping table will be more efficient because again we will be having 1 billion rows in this table too, and now we have to run scan operation on 1 billion rows again if we want to find user_id with a specific skill_id.

    • @sharangshrivastava6579
      @sharangshrivastava6579 2 года назад

      yeah thought so

    • @Aman4804
      @Aman4804 6 месяцев назад

      Because now we can create an index on skill_id column of user_skills table so the query will use index scan and not full table scan

  • @nehagupta-ey3ez
    @nehagupta-ey3ez 2 года назад

    Please cover the topics of database migration to Cloud

  • @jivanmainali1742
    @jivanmainali1742 3 года назад +1

    how social site shows your like on a post even after visiting site 10 days later it shows my like to different post

  • @shivkawtikwar007
    @shivkawtikwar007 3 года назад

    Very useful video but one doubt is that, it would be more appropriate if we have start and end date in relational table user_company instead of company itself?

    • @SCALER
      @SCALER  3 года назад

      Yes, since the start and end date are a part of user-company mapping it should be a part of the user_company table.
      If we add start and end date in company table will denote the date when company was started and ended(in case the company is not operational anymore)

  • @arpanbanerjee8584
    @arpanbanerjee8584 3 года назад

    Thanks for the awesome video! Can you pls tell what is the type of the "entity type" inside the "like" table.

    • @SCALER
      @SCALER  3 года назад +1

      entity type will be an enum which can hold values: comment, post

    • @arpanbanerjee8584
      @arpanbanerjee8584 3 года назад

      @@SCALER okay! Thank you

  • @28petals
    @28petals 7 месяцев назад

    is one table good to keep all user connection data

  • @prasadm3614
    @prasadm3614 3 года назад

    Thi is cool

    • @SCALER
      @SCALER  3 года назад

      Thank you Prasad

  • @rahulvutukuri9254
    @rahulvutukuri9254 3 года назад

    Hello sir, I have a request on TOPIC which is related to Consistent hashing the server request to a server that handles transaction events in stateful services. In stateful service, the state or obj is alive in a particular replica of an app in a distributed, scalable system, now when multiple PUT or POST requests happen to same the same request, (ex: CART and adding items to CART, each scanned item is an individual request) the 2nd request or last request goes to a different server in internet updating the CART document or row in DB. How can we avoid multiple network calls to DB every time to update CART for each scan. Can we use distributed caches? or we need to route such requests to same server in load balancing

    • @javeedbasha6088
      @javeedbasha6088 2 года назад

      I think its best to say that if you are using more than one server instance you need it to be stateless. you can migrate to using jwt.

  • @Amritanjali
    @Amritanjali 3 года назад +1

    please add more videos on Schema Design

    • @SCALER
      @SCALER  3 года назад +1

      Sure, we have more videos on Schema Design coming soon

  • @betikuntibhargav2712
    @betikuntibhargav2712 Год назад

    Thank you very much Mohit Yadav. After watching this video I just cleared my Data base design Interview in Managerial round. I used this knowledge in Interview and the Interviewer got impressed. Once Again Thanks @Scalar for finding such a GEM.

  • @sunnychaturvedi9958
    @sunnychaturvedi9958 2 года назад

    follower relationship cannot be modelled by using isAccepted flag , because we can have a situation were a connection has unfollowed me

  • @ravindrajonwal580
    @ravindrajonwal580 3 года назад +6

    what would be our table design in case of nested comments?

    • @dullard007
      @dullard007 3 года назад +18

      For nested comments, have one more column: parent_id. This will be a self referencing foreign key joining the same table on id. For comments at root level, the parent_id column will be null.

  • @priyanshuaggarwal5318
    @priyanshuaggarwal5318 2 года назад

    Gmail App schema design bhi cover kra dijiye.

  • @mohinigupta6609
    @mohinigupta6609 2 года назад

    How find list of followers

  • @ggsgetafaf1167
    @ggsgetafaf1167 Год назад

    You should continue to make videos like this. Thank you

    • @SCALER
      @SCALER  Год назад

      Thanks! Keep an eye out for more such videos! 😃