MySQL 16 - Foreign Key

Поділитися
Вставка
  • Опубліковано 23 жов 2024

КОМЕНТАРІ • 34

  • @melvar1309
    @melvar1309 3 роки тому +1

    Thanks, these videos are short and to the point which helps a lot when I just want to check out some specific concepts for a project that I'm working on and I have to use MySQL

  • @hyperhippyhippohopper
    @hyperhippyhippohopper 4 роки тому +3

    4:36 Somebody has got to get Batman a foreign key for his birthday

  • @unknownad_official
    @unknownad_official 3 роки тому

    thank you!
    that was exactly what i were looking for

  • @sergeyvikulov2622
    @sergeyvikulov2622 6 років тому

    Caleb, could you explain is it possible or acceptable to create a foreign key to a field in another table and this field is a foreign key which references to a primary key in another table yet? For example a table `cities` has a field called `cities`.`region_id` which is foreign key to table `regions` (field `regions`.`id`) and a table `stations` has a field `stations`.`region_id` which is foreign key to table `cities` and references to `cities`.`region_id` but not `regions.id`?
    Thank you for your videos! They are very useful!

  • @Romeo-vt8hq
    @Romeo-vt8hq 3 роки тому +1

    Bro your videos are the best, you have a talent at explaining thing. Thanks you =)

  • @VandalStreet
    @VandalStreet 7 років тому +5

    Helpful lecture. Good job!

  • @rakhshandamujib2793
    @rakhshandamujib2793 6 років тому +1

    Can you tell me how to filter data in both parent and child tables using the primary key?

  • @etinosaizekor6533
    @etinosaizekor6533 3 роки тому

    Great video, Caleb!

  • @stackoverflow2522
    @stackoverflow2522 3 роки тому

    happy new year

  • @BharatSingh-zk8lx
    @BharatSingh-zk8lx 6 років тому +5

    it's little confusing at 3:00 and 4:30. At 3:00 u made two references and at 4;30 u said only one ref. can be made, please explain

    • @KarimaKadaoui
      @KarimaKadaoui 6 років тому

      The 'Unique' constraint is optional. If you set it, then a parent can't have more than one child. Otherwise, it's possible.

    • @justinrocky6645
      @justinrocky6645 4 роки тому

      @@KarimaKadaoui ua-cam.com/video/rRmI16IkqG0/v-deo.html

    • @justinrocky6645
      @justinrocky6645 4 роки тому

      ua-cam.com/video/rRmI16IkqG0/v-deo.html

  • @csharp8703
    @csharp8703 4 роки тому

    That first example was not very good but the rest worked fine

  • @windyboy1995
    @windyboy1995 4 роки тому

    Thank you a lots (Y).

  • @marcelijankowski9593
    @marcelijankowski9593 2 роки тому

    Golden

  • @zgwenwen
    @zgwenwen 7 років тому

    why do you have two children with ID 7 reference to same parent? (3:00)

    • @gioac96
      @gioac96 7 років тому +2

      One clear example of this could be a comments table that stores comments submitted by users in a social network. Each user can comment more than once on a single post, but every comment must always reference its author

    • @EricCartmanFTW
      @EricCartmanFTW 7 років тому +1

      great example. thx mate

    • @justinrocky6645
      @justinrocky6645 4 роки тому

      ua-cam.com/video/rRmI16IkqG0/v-deo.html

    • @justinrocky6645
      @justinrocky6645 4 роки тому

      @@gioac96 ua-cam.com/video/rRmI16IkqG0/v-deo.html

    • @justinrocky6645
      @justinrocky6645 4 роки тому

      @@EricCartmanFTW ua-cam.com/video/rRmI16IkqG0/v-deo.html

  • @chrisjob356
    @chrisjob356 6 років тому

    watching this in 2017.

  • @osamaabdelqader438
    @osamaabdelqader438 7 років тому +1

    you are awesome

  • @GAURAV-xd1pi
    @GAURAV-xd1pi 4 роки тому +1

    fk