Database Tables, Primary Keys, Foreign Keys, and Relationships

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ก.ย. 2024
  • Explaining the basic constructs of a relational database: Tables, Primary Keys, Foreign Keys, and Relationships. The database is normalized.

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

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

    gets better after Tables and Primary Keys. Glad I gave it extra 3 minutes of my life and learned something of value!

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

    Thanks for your clear no non-sense explanation. These concepts should be relatively easy to grasp, but you would be amazed at how misunderstood foreign keys can be.

  • @jeanrs3565
    @jeanrs3565 9 ปีที่แล้ว +37

    way better explanation than my professor

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

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

    Relational databases concepts, never been more simple! Great video!

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

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

    Hey Minderchen, great job! Keep these short, clear, and detailed videos coming! Helps a lot!

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

    Very good Basic concept tutorial.....Really enjoy this....

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

    This is the clearest explanation I have found thus far of these relationships!

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

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

    ooh man this video was uploading in 2011 when I was 11 years old
    and now I am watching it on my 5th semester 2020
    I was playing on streets that time while you were saving me 9 years later..thanks bro

    • @Shaima-zl8uk
      @Shaima-zl8uk หลายเดือนก่อน

      Same ,in 2024🤝😂

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

      @@Shaima-zl8uk I don’t even remember writing this comment😂
      New update: I work as a software developer now and I updated the stored procedures in DB this morning…nothing you learn will be wasted Shaima Good Luck🔥🙏🏻

    • @Shaima-zl8uk
      @Shaima-zl8uk หลายเดือนก่อน

      @@asma8150 MashaAllah so nice😍 and good luck for you too❤️❤️❤️

  • @mrsprincezcj
    @mrsprincezcj 7 ปีที่แล้ว +5

    Nice video mr. Really helpful thank you. Its so funny how ppl hate way to much then actually appreciate.

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

    This is a very thorough and well thought out explanation. The most helpful lessons on data base concepts come from those like you who use a generic approach.

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

    Thank you so much! Despite the distracting clicking sounds, your explanation was way better than the one from my teacher. Thanks!

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @marcelino.bistervelts3610
    @marcelino.bistervelts3610 10 ปีที่แล้ว +1

    very clear and constructive explanation about building a simple relational databse, thank you

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

    Thank you, this was a very thorough and practical explanation. I appreciate how you unified all these concepts in a single lecture. I especially appreciate the explanation of a compound primary keys, as in the Order Line table. I was very confused about those.

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

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

    Thank you for sharing the concept in lucid manner and keeping it interactive as well.

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

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

    Thanks for explaining...keep making these videos.

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

    Excellent! I'm new to this and you did a great job explaining relational databases!

  •  10 ปีที่แล้ว +6

    Yay I understand the primary key - foreign key relationship now. Thank you :)

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @kierstanbelle5207
    @kierstanbelle5207 5 ปีที่แล้ว

    THIS GUY IS THE BEST HAVE SEEN SO FAR

  • @taniarahman9028
    @taniarahman9028 11 ปีที่แล้ว

    the most well explained tutorial about Data base I have seen so far. Thank you.

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

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

    Great Video. Thanks for making a complex topic so easy to understand.

  • @arunashispaul9380
    @arunashispaul9380 11 ปีที่แล้ว

    waooo..this is superb and excellent video....4 understand P.K,F.K....ITS a fab

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

    Excellent explanation!

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

    I'm making my first steps in databases and it's exactly the explanation I needed.
    Thank you so much

  • @TheSnerggly
    @TheSnerggly 12 ปีที่แล้ว

    This was helpful. I need to watch it again but the core concepts make sense. Thank you for posting this.

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @strumming.jinang
    @strumming.jinang 4 ปีที่แล้ว

    very best example for better understanding of keys in practical scenario
    thank you very much.....

  • @patois
    @patois 12 ปีที่แล้ว

    Thank god you're here in this world!!!
    I'm having an examination tomorrow while still blank :)

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

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

    Great Explanation!

  • @MySyro4ek
    @MySyro4ek 11 ปีที่แล้ว

    simpliest way to deliver informaion. Thank you!

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @frankfill2050
    @frankfill2050 12 ปีที่แล้ว

    wow....the most crystal clear explanation i've ever seen...thank you...

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @ritamoore4006
    @ritamoore4006 6 ปีที่แล้ว

    So grateful for making this so easily understood.

  • @AClarke2007
    @AClarke2007 10 ปีที่แล้ว

    Immediately helpful presentation if you are blind and deaf.

  • @hsinRamen
    @hsinRamen 9 ปีที่แล้ว

    Wow, thank you very much for posting this. Very thorough and well paced. 感謝!

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @utkucansa
    @utkucansa 7 ปีที่แล้ว

    Hey Chen, lots of love and respect from Anatolia,
    Thanks a lot,

  • @runachic1
    @runachic1 12 ปีที่แล้ว

    GREAT VIDEO...THANKS SO MUCH...LOVE YOUR TEACHING STYLE..KEEP IT UP

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

    thank you so much.. i now have a better understanding

  • @rosettajacob927
    @rosettajacob927 3 ปีที่แล้ว

    Very, very informative. Thank you!

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

    You sounded like a Bond villain, but great job, now I finally understand, my professor sucked :(

  • @jameeltayeb967
    @jameeltayeb967 8 ปีที่แล้ว

    Good explanation and good example, thank you very much.

  • @1lie2die
    @1lie2die 12 ปีที่แล้ว

    very informative video and easy to understand!!! thanks a lot..

  • @abdikarim7306
    @abdikarim7306 7 ปีที่แล้ว

    It is a very good video, absolutely make sense. pp who said something negative, if they know better than this video then, they should do it. why not? thank you very much, sir. I really like it.

  • @kittycatbuttbutt
    @kittycatbuttbutt 8 ปีที่แล้ว +6

    thanks helped a lot

  • @ghafargulqasemi5279
    @ghafargulqasemi5279 11 ปีที่แล้ว

    Thanks for your great tutorials,

  • @txmas3235
    @txmas3235 9 ปีที่แล้ว

    Definitely helped grasp a better understanding.....Thx

  • @neanderslob
    @neanderslob 11 ปีที่แล้ว

    Nice explanation. Much appreciated!

  • @reazkayum4030
    @reazkayum4030 9 ปีที่แล้ว

    Great video. Thanks for sharing.

  • @TheCoolman5500
    @TheCoolman5500 10 ปีที่แล้ว

    Fantastic >>>> All thanks to you.

  • @Arxios
    @Arxios 11 ปีที่แล้ว

    Awesome video!

  • @padmoretenkorang151
    @padmoretenkorang151 11 ปีที่แล้ว

    Thanks for your great tutorials, really appreciate

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @buddylantz
    @buddylantz 10 ปีที่แล้ว

    Very clear and concise. Thanks minder.

  • @eroms74
    @eroms74 12 ปีที่แล้ว

    Excellent delivery

  • @TheMadhubi
    @TheMadhubi 13 ปีที่แล้ว

    Amazingly described!

  • @arnold9448
    @arnold9448 9 ปีที่แล้ว +38

    Please, disable the clicking sound next time you're making a video!

    • @Sunelification
      @Sunelification 8 ปีที่แล้ว

      +Arnold Hofman full of shit

    • @arnold9448
      @arnold9448 8 ปีที่แล้ว +4

      +Sunel Visser ?

    • @just456bc
      @just456bc 8 ปีที่แล้ว

      Really?

    • @arnold9448
      @arnold9448 8 ปีที่แล้ว

      just456bc Nope

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

      lol

  • @MegaManBn
    @MegaManBn 10 ปีที่แล้ว

    thank you, sir. now i understand what is those. *my teacher just suck. they teach way too complex when i am just new to this.

  • @manpreetmannu9054
    @manpreetmannu9054 11 ปีที่แล้ว

    thanx for help me in my class to protect teacher

  • @lrammohanreddy
    @lrammohanreddy 11 ปีที่แล้ว

    Very good video.

  • @zabir512
    @zabir512 8 ปีที่แล้ว

    Wow! I've got this now. That helps a lot. Thank you so much. :)

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

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

    Hi bud, thanks for the knowledge, and I was wondering why didn't you use customer_id as your "foreign key " in the ORDER LINE table to connect the two tables? Wouldn't that work at all?

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

    Aren't you breaking Second Normal Form with that partial dependency between the Order table and the Order Line Table?

  • @moneymaker159
    @moneymaker159 11 ปีที่แล้ว

    Very clear. Thanks!

  • @neerajkumarchauhan
    @neerajkumarchauhan 11 ปีที่แล้ว

    very good explanation

  • @TheMikeTracing
    @TheMikeTracing 12 ปีที่แล้ว

    this tutorial is really helpful!

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

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

    Thanks for the video! It was very informative.
    Quick question, though: Can you clarify how will "NULL" apply in this?

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

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

    So is Order ID and Line Item on the ORDER LINE table a 'Composite' Primary Key?? Just that bit confused me..

  • @dr.grgkosalasrandeniya9649
    @dr.grgkosalasrandeniya9649 11 ปีที่แล้ว

    a good vedio

  • @Bhelsewale
    @Bhelsewale 11 ปีที่แล้ว

    clearly explained.

  • @bestvideos8407
    @bestvideos8407 4 ปีที่แล้ว

    Thanks for these bro

  • @Sunelification
    @Sunelification 8 ปีที่แล้ว

    Well done

  • @chiggrens_playground3193
    @chiggrens_playground3193 6 ปีที่แล้ว

    Thanks a lot for this, really informative.

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

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

    this was good.
    do you have more of these things?

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @231myboo
    @231myboo 8 ปีที่แล้ว

    Very helpful

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

    thank youuu (y) , merci ,, god bless you :)

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @jonmackey042280
    @jonmackey042280 11 ปีที่แล้ว

    Dude, spot on!!

  • @mohammadabosoud3524
    @mohammadabosoud3524 11 ปีที่แล้ว

    thank its very usfull

  • @T10utd
    @T10utd 12 ปีที่แล้ว

    thank you, very informative.

  • @vishantramratan
    @vishantramratan 7 ปีที่แล้ว

    Very good explanation!

    • @amalb5923
      @amalb5923 7 ปีที่แล้ว

      Tosh Ram mosalsal asiya

    • @amalb5923
      @amalb5923 7 ปีที่แล้ว

      mosalsal asiya

    • @amalb5923
      @amalb5923 7 ปีที่แล้ว

      mosalsal asiya

  • @la456it
    @la456it 10 ปีที่แล้ว

    Thank you

  • @throwingninetyeight8631
    @throwingninetyeight8631 6 ปีที่แล้ว

    You the man

  • @willpearson
    @willpearson 7 ปีที่แล้ว

    Is it not called a candidate key when you use 2 attributes to identify the rest of the table? I thought primary keys could only use 1 attribute

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

    This is pretty helpful, but would be WAY MORE helpful if the text was legible, and I could actually read the content to understand the relationships better. Why only 360p?

  • @philiprand3720
    @philiprand3720 7 ปีที่แล้ว

    I am trying to construct a database of assets. If I try to put portals on a single layout, there are conflicts and the data gets corrupted. There are entries like "dividends" "interest" "gain", etc. and I can't figure out how to relate the files - all goes to show how amateurish I am (but I'll keep at the instruction books).

    • @robertwelsh2558
      @robertwelsh2558 6 ปีที่แล้ว

      Create a table called Assets with an assetsID as Primary Key. All the other entries are record fields in the table. Some fields will be numeric of type decimal etc. Planning is important, this is where knowing your software and the use of Entity Relationship Diagrams (ERD) come in handy, especially if you are dealing with multiple tables. Frequently backup your data as insurance from data loss.

  • @elizarehan
    @elizarehan 13 ปีที่แล้ว

    brilliant

  • @yanicyoung8422
    @yanicyoung8422 11 ปีที่แล้ว

    good video should explain how to do more

  • @rafiaakhter2214
    @rafiaakhter2214 6 ปีที่แล้ว

    Why order and delivery table are separated ? . It is not clear if
    you could, for example, have multiple deliveries for an order.

    • @minderchen
      @minderchen  6 ปีที่แล้ว

      You need to have a separate shipping table and a shipping detail table. It will be a little bit more complicated. Order table and Shipping table has a 1-to-many relationship.

  • @tina49626
    @tina49626 10 ปีที่แล้ว

    you saved me!

  • @geoffjacobs267
    @geoffjacobs267 6 ปีที่แล้ว

    Could anyone help me with figuring out how the value of the "line item" field in the order line table would work? How would it start off at "1", then automatically increment by 1 (if more than one type of item is purchased), yet start off at "1" again for the next order?

    • @minderchen
      @minderchen  6 ปีที่แล้ว

      Technically you can use a timestamp to replace the line item #, when you need to display the order detail items for an order, you sort the related order detail rows by the time stamp, then they will be displayed according to the sequence they were created. If you delete or add new items the ordered of these items will be still correct. Using 1, 2 , 3 as line item number is fine, but delete and update may create a problem in sequencing. I probably will not recommend it.

    • @geoffjacobs267
      @geoffjacobs267 6 ปีที่แล้ว

      That's a great idea. Thank you for your help.

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @SEEpath-kt7jm
    @SEEpath-kt7jm 8 ปีที่แล้ว

    First thank you, my good man, for the very informative video nicely done.
    Also, can you please improve the quality of the video I'm on Verizon Fiber Optic and the quality of the video is not great so it's kinda confusing sometimes when you refer back to something.

    • @reddyreddy5577
      @reddyreddy5577 4 ปีที่แล้ว

      th-cam.com/video/YI06S-0tAoc/w-d-xo.html

  • @DhavalPanchal1995
    @DhavalPanchal1995 10 ปีที่แล้ว

    i was confuse...but now i understand ....#PD:

  • @blueyedhusky
    @blueyedhusky 9 ปีที่แล้ว +7

    Thanks for the video, but I couldn't bear watching and listening to it for more than a minute. You need to speak farther away from the microphone, and capture screens with a better resolution to make the text legible (which it isn't at all).

  • @jonmackey042280
    @jonmackey042280 11 ปีที่แล้ว

    thnks

  • @pbchandra1
    @pbchandra1 7 ปีที่แล้ว

    can there be two primary keys in a single table ?
    For example if a table CONTACT contains contact number, contact name, address. Then generally contact number has to be primary key. But what if two different persons use the same contact number ? (like father and son).

    • @polarmandan
      @polarmandan 7 ปีที่แล้ว

      A primary key has to be an unique identifier. Therefore, the contact number wouldn't be used as a primary key. Each contact would most likely get a unique number that represents them. For example, I could be Customer ID 40232 and you could be customer ID 40233. By using our primary keys, you would then find out the supporting information such as our contact number, name and address.

    • @ThaRealChuckD
      @ThaRealChuckD 7 ปีที่แล้ว

      You can, it's called a candidate or composite key. But he is breaking second normal form with that partial dependency. Someone on here said he should normalize the Order Line table. He's right.

    • @robertwelsh2558
      @robertwelsh2558 6 ปีที่แล้ว

      The ContactID (for example) is created by the DBMS when a record is created (the record number in the table), is auto incremented, a positive integer, and must be unique. Only the software and DBMS needs to know the actual CustomerID. Customer Account Numbers are generated when an account (record) is created and is unique to each contact etc (the bit you need to know and keep handy so you can rant to Customer Services).
      If you have a Contact table containing the following:
      contactId (primary key)
      contactReferenceNumber (contact’s unique reference number)
      title
      foreName
      middleName
      lastName
      1stLineAddress
      etc
      Two people can be at the same address as they have different reference numbers and a different contactId in the Contact table.
      In a father / son situation you could find either Senior or Junior using a lastName search ie.
      SELECT * FROM contact WHERE (foreName = ‘John’ and lastName = ‘Doe Junior’ and city = ‘NY’)
      Will find the details of every John Doe Junior in New York unless you refine the search parameters in the WHERE clause.
      To hit the nail on the head and go straight to the customer's record use something like:
      SELECT * FROM contact WHERE contactReferenceNumber = 'AB72839494'

  • @IIrandhandleII
    @IIrandhandleII 12 ปีที่แล้ว

    great video, i would just suggest a new mouse

  • @aaronrodriguez110
    @aaronrodriguez110 7 ปีที่แล้ว

    you keep saying at 6:00 that order id is the foreign key for the order table....i think you mean customer id, no?

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

    While I appreciate the making of the video I was not able to get past the first minute because of the clicking.

  • @praveenharan
    @praveenharan 11 ปีที่แล้ว

    @05:56 CustomerID or OrderID

  • @abdulhameed1243
    @abdulhameed1243 9 ปีที่แล้ว

    Are these table normalized??

  • @minderchen
    @minderchen  11 ปีที่แล้ว

    I used Camtasia.

  • @TechknowledgeComp
    @TechknowledgeComp 11 ปีที่แล้ว

    Nice video, but man the mouse clicking sound you used is pretty annoying..lol but other than that great video.

  • @vaibhav19
    @vaibhav19 8 ปีที่แล้ว

    @5:41: Its customer ID not Order ID. Quite an egregious error considering explaining foreign key and primary key was one of the main agenda of this video!!!

  • @wizbird2018
    @wizbird2018 8 ปีที่แล้ว +10

    Please disable the clicking sound. That is very distracting.

  • @md94598
    @md94598 11 ปีที่แล้ว

    whats up with your mouse?