Database Design Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024

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

  • @angelamalik9437
    @angelamalik9437 7 ปีที่แล้ว +20

    I cannot fault anything about this video. It's simple, and you've presented the information in an elegant, clear manner at a steady but not-too-slow pace, and the information is so incredibly useful. That bridge table idea is exactly what I was needing to solve my DB design. Thank you for sharing your knowledge!

  • @keithrusso8681
    @keithrusso8681 5 ปีที่แล้ว +29

    Thank you for taking the time to create this tutorial. Sharing your apparent years of accrued knowledge has saved myself and others countless hours of frustration. Because of your tutorial, I'm not even thinking about smashing the wife's favorite coffee mug anymore. Thank you again, sir.

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

      @Lh Lh no he's 12 and a half

  • @Ckrispbacon
    @Ckrispbacon 4 ปีที่แล้ว +26

    I have been struggling for two weeks trying to understand many-to-many and this example made it all clear now. You're the best!

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

    This video was so enjoyable to watch. Your teaching style and pace is really effective. You explain poor database design so well.

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

    This is actually perfect, I had a good understanding of this but this has cleared all my doubts and solidified my knowledge.

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

    Thank you for presenting such explanation that isn't provided on my online studies.

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

    U reminded me one of my funny Lecturer whos teaching me this Unit{Database}...Above all, u r amazing. Thanks, Sir.Greetings from Kenya

  • @Jacob-ix4gp
    @Jacob-ix4gp 28 วันที่ผ่านมา

    I am in one of his classes now. Great professor.

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

    Important to know: Reverse engineering for databases exists only up too Visio 2010. That was an extremely good feature to create nice looking ERD for documentation purposes.

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

    Amazing...
    Love from India !

  • @gloryjeansqueaky
    @gloryjeansqueaky 8 ปีที่แล้ว +17

    This was incredibly helpful! I am designing my first database for my mother's daycare business. I liked the idea of separating the Orders from the Products, but I don't know if I that's how I should create the classes in my database. I have a table with classID and location and capacity. Then I have a Student Table and a Teacher Table. Right now I have tacked on to each the Student and Teacher tables a field called ClassID where you can plug in the ClassID to which they belong at the moment. But then I was thinking after watching this video, if it's better design to have a separate table which has ClassID and PersonID only. That personID can either be a TeacherID or a StudentID so that the table would reflect every person tied to that particular class. I'm double thinking my design.

    • @GoSparker
      @GoSparker  8 ปีที่แล้ว +14

      MGELC - one of the most common responses to database design questions is "it depends." In your case if you have the ClassID in the Student and Teacher tables then you can only have one instance of a class for each student and teacher. In other words, you won't see history. For example, I can put the ClassID into the Student table and see what class the student is currently in, but if you move the student to another class then the ClassID changes in the Student table and you don't have a record of the previous student class relationship. If you have a bridge table between Student and Class (let's call it StudentClass) and have the StudentID and ClassID in the StudentClass table as well as a start and end date you will be able to keep track of all of the classes a student has been in. Similar with the Teacher and Class relationship. The other thing that the StudentClass table can do for you is allow a student to be in more than one class at a time.Another part of the "it depends" question is how important is it to know if a student was in another class? If you don't care then you may not have a use for the StudentClass table and perhaps could just use a comment field in one or more of the tables to handle some details. The problem with comment fields is that they can be hard to use in queries - particularly in joins. Hope this helps.

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

      MGELC a link table is what you are looking for 😀 a table that just provide links to related data

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

      you can connect with me on whatsapp +256787867812

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

      @@GoSparker That's a great answer and very helpful. Thanks!

  • @Brad10
    @Brad10 7 ปีที่แล้ว +11

    Thank you for the upload! Do you know if Dr. Gogolin has a series of videos or a channel anywhere? I was able to grasp the concepts he was talking about a lot better than most instructors.

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

    Just learning SQL and this helps on the many-many relationship

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

    Thank you for explaining based on practical corporate experience

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

    thank for this wonderful tutorial

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

    First letter of each word is capital in ZipCode is Pascal Naming convention,
    Camel case naming convention is zipCode first letter will be small of the word, after that first letter will be capital

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

    Excellent work! Thank you so much for this training!!!

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

    Extremely concise. Thank you!

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

    Very good explanation, thank you!

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

    I have hard time understanding the second version of the model. How is the address tied to customer ID? What specifically is the address attribute for? Street name, house number, flat number? How is this situation different from having customer name in one field as it is in the first model?

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

    Best tutorials one can have. Thanks a ton!

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

    Awesome way of explaining...Thanks!

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

    Thanks this gave me some clarity!

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

    thanks for this!

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

    This was a very helpful and informative video. Thank you. I'm looking forward learning more.

  • @kennethmcquade4341
    @kennethmcquade4341 5 ปีที่แล้ว +4

    this is brilliant, thank you

  • @GoodDeedsLeadTo
    @GoodDeedsLeadTo 2 ปีที่แล้ว

    Oracle Database is a set of tables with foreign key primary key relationship and at the O/S level it is a file with dbf extension?
    &
    database server at the O/S level is a set of dbf and files with few other extensions?

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

    excellent, thank you for making this video, very helpful!

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

    Shouldn't the CustomerID in CustomerPhone be a FK not a PK? Same as the OrderID and ProductID in the OrderProducts table?

    • @littleleaves9886
      @littleleaves9886 2 ปีที่แล้ว

      if we make them FK then we have to introduce their own ID like customerPhoneID, orderProductsID

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

    Fantastic video. Thank you for creating this!!

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

    Excellent video! Thank you

  • @peterlyon185
    @peterlyon185 2 ปีที่แล้ว

    Thank you so much for this video 🙏🏼

  • @ashwinimudaliar9801
    @ashwinimudaliar9801 2 ปีที่แล้ว

    so nicely explained..thanks!

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

    A very nice explanation, thank you for the tutorial.

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

    I appreciate the great explanation, thank you! Saved me allot of time :)

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

    Fantastic tutorial Sir. Thanks a lot.

  • @AbdurRahim-ot5gp
    @AbdurRahim-ot5gp 4 ปีที่แล้ว

    A problem occurred while Microsoft Access was communicating with the OLE server or ActiveX Control how to fix

  • @jonghunpark1403
    @jonghunpark1403 5 ปีที่แล้ว +4

    This is just awsome! Thanks so much.

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

    Am a newbie in Ms access i think the data design is quite helpful

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

    Thanks for this lesson. I wasn't clear on why 2 phone numbers is bad?

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

    10:50 And if 1-N or N-1 and not N-N what you? not bridge table?

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

    Why we can't we use both orderID and product ID as composite key in this?why we use line No and orderID as composite key?

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

    Thanks for this awesome lecture

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

    best example for bigginers

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

    Hallo, i watched ur vedio , it is great thank u from ur teachng, want a database which is already created in postgresql , then i can fallow step by step.
    thank u

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

    Super helpful, thanks!

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

    Is it correct that OrderProducts and Products should NOT be plural?

  • @victoriagabaldon8469
    @victoriagabaldon8469 2 ปีที่แล้ว

    Thank you Super Helpful!

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

    Sir , Thank you for the lecture, it cleared up lot of things that i didnt understand before? do you have any other videoes on relational databse design and implementation?

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

    why all PK there is no FK?

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

    Sorry sir .once you are given to design an ERD of an organization or companies .and you want all departments to be represented by it table how do we count relation between the attribute (many to many) or (one to one) or (one to many)? Please sir help me

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

    Thanks for your good work

  • @joshuafancher3111
    @joshuafancher3111 6 ปีที่แล้ว +4

    Thanks for the tutorial!

  • @biruksisay3717
    @biruksisay3717 7 ปีที่แล้ว +4

    Thank you !

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

    good video, thanks

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

    Great explainer, thanks.

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

    Thanks for video. But I have a question. How can you say that customer table violates 2nf? I don't think it does because employer name is totally dependent on customer key and not the subset of the candidate key. Please let me know. Thanks!

    • @littleleaves9886
      @littleleaves9886 2 ปีที่แล้ว

      I agree with you. But if you need to keep full details of Employer, better move that to separate table.

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

    nice video
    keep it up

  • @BRP-Moto-Tips
    @BRP-Moto-Tips ปีที่แล้ว

    Thanks mate 👑

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

    Great video! I would like to correct you on one thing @ 15:50... you are using PascalCase and not camelCase... notice the difference?

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

      Pascal Case is a subset of Camel Case, which is the more widely known term (although Pascal Case could very well be more utilized in database naming). To be more complete with the various ways fields are often named: camelCase, PascalCase, snake_case, kebab-case ... but even within these there are variations and different types of requirements depending on many things including programming language and configuration of installation. One other point - many DBMS installs are not case sensitive by default. Could almost make a video just on naming conventions... thanks for bringing this up Mike.

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

      Yes it's PascalCase.

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

    Why is Excel not a database? Even a piece of paper can be a database right?

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

      No, a piece of paper is not a database. The easiest way for me to explain is to say that the data in an excel spreadsheet can be used BY a database to manipulate or manage that data, but it is not in and of itself a database.
      Think of a spreadsheet as being flat, again, like a sheet of paper but a database as being multi-dimensional.
      When you want a simple "list" a spreadsheet will do just fine, but as your needs grow and the data points begin to relate in different ways, you may need a database to organize and report on that data.

  • @md.imanali9998
    @md.imanali9998 5 ปีที่แล้ว

    Very helpful. thank you for making this video.

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

    Great work, if you have anymore examples please do share them. In your 3NF what exactly happened to the multiple values for phone numbers, if a customer had a work and home number what happened there?

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

      Go to about 8:10 and the CustomerPhone table as a design option. There is a Type column that you can use to distinguish between work, home, cell, etc. The design could be expanded to have a Type table with TypeID and Type and then you would put TypeID in the CustomerPhone table rather than Type. This expanded design would help control and standardize the Type(s) that are used in the applications.

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

      Thanks for this comment; I feel like your description in the video did not explain the improvement very well, but this comment helps cover that gap.

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

    thank you sir.

  • @JamesAutoDude
    @JamesAutoDude 2 ปีที่แล้ว

    I learned this too late after my database grew too much 😭 the struggle is real

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

    thanking you
    Very helpful video

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

    Thank you .. Sir. Just on lighter note: :-) Sai Reddy .. 8342 Cricket as address :-) :- ) I come from same city Hyderabad and I confirm this is example not real data .. zip code there 6 digits?

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

    Very good tutorial

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

    great explanation, thanks

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

      HELL IS REAL
      HEAVEN IS REAL
      GOD IS REAL
      JESUS IS THE SON OF GOD
      ALL THOSE WHO ARE NOT SAVED WILL GO TO HELL AND HELL IS TORTURE FOR ETERNITY BURNING IN NEVER ENDING FIRE, ONCE YOU ARE IN HELL THERE IS NO WAY OUT, HOWEVER RIGHT NOW IT IS POSSIBLE TO PREVENT YOURSELF FROM GOING TO HELL AND BECOMING SAVED AND THERE IS ONLY ONE WAY OUT AND THIS WAY IS JESUS, JESUS DIED AND ROSE AGAIN AS A SACRIFICE FOR OUR SINS SO THAT WE DON'T HAVE TO GO TO HELL AND WE CAN HAVE EVERLASTING LIFE SO WE CAN SPEND ETERNITY WITH HIM IN HEAVEN WHICH IS PURE PARADISE. ALL YOU HAVE TO DO IS TO PUT YOUR FAITH IN JESUS AND TRUST THAT HE WILL SAVE YOU AND THE HOLY SPIRIT WILL MAKE HIS HOME IN YOUR HEART AND LEAD YOU ON THE RIGHT PATH. DON'T DELAY IN TRUSTING JESUS BECAUSE WE CANNOT TELL WHEN IT IS TOO LATE. JESUS IS COMING SOON PLEASE BE READY AND MAKE THE RIGHT CHOICE

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

    really well explained

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

    Wow thanks

  • @lukealadeen7836
    @lukealadeen7836 2 ปีที่แล้ว

    What about data lakes?

  • @mudaprince3067
    @mudaprince3067 2 ปีที่แล้ว

    i want to prepare supply chain project can you help me please

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

    may did you make a vedio for a ER diagram of computer Store.

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

    can we use customer ID , Product Id in a single table?? of order ID

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

    Great example...

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

    Lovely. :)

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

    Very clear. Thank you.

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

    very good

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

    Excellent... E.. X... C.. ellent..

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

      Thank you Santosh!

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

    i like this thanks allot

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

    thanks brother

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

    really cool

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

    good content, thank you

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

    What is the software name...

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

      Microsoft Visio was the diagram tool and SQL Server Management Studio was the database tooling

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

      @@ChristopherJohnsonIsAwesome Yes Santosh - Christopher is correct.

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

    nice video

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

      HELL IS REAL
      HEAVEN IS REAL
      GOD IS REAL
      JESUS IS THE SON OF GOD
      ALL THOSE WHO ARE NOT SAVED WILL GO TO HELL AND HELL IS TORTURE FOR ETERNITY BURNING IN NEVER ENDING FIRE, ONCE YOU ARE IN HELL THERE IS NO WAY OUT, HOWEVER RIGHT NOW IT IS POSSIBLE TO PREVENT YOURSELF FROM GOING TO HELL AND BECOMING SAVED AND THERE IS ONLY ONE WAY OUT AND THIS WAY IS JESUS, JESUS DIED AND ROSE AGAIN AS A SACRIFICE FOR OUR SINS SO THAT WE DON'T HAVE TO GO TO HELL AND WE CAN HAVE EVERLASTING LIFE SO WE CAN SPEND ETERNITY WITH HIM IN HEAVEN WHICH IS PURE PARADISE. ALL YOU HAVE TO DO IS TO PUT YOUR FAITH IN JESUS AND TRUST THAT HE WILL SAVE YOU AND THE HOLY SPIRIT WILL MAKE HIS HOME IN YOUR HEART AND LEAD YOU ON THE RIGHT PATH. DON'T DELAY IN TRUSTING JESUS BECAUSE WE CANNOT TELL WHEN IT IS TOO LATE. JESUS IS COMING SOON PLEASE BE READY AND MAKE THE RIGHT CHOICE

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

    please any body give me a learning managment system ERD in database

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

    next part plz

  • @Endoe.McKronic
    @Endoe.McKronic 5 ปีที่แล้ว

    I fell asleep like 4 times.... Sheeeesh

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

    👀

  • @roselpadilla
    @roselpadilla 2 ปีที่แล้ว

    Ferris State > hArVard

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

    Data viz, because I'm dumb.
    customer:
    id=1(pk); fname=paul
    id=2(pk); fname=matt
    Products:
    id=16,(pk) name=sunglasses
    id=17(pk), name=Nintendo switch
    order:
    id=1(pk); customer_id=1, date=2021
    id=2(pk); customer_id=2, date=2020
    order_products:
    [order_id=1, product_id=16](pk); qty=1 "paul order 1 sunglasses"
    [order_id=1, product_id=, 17](pk); qty=1 - ON Conflict (set qty += 1) -- update qty for duplicate
    [order_id=1, product_id=, 17](pk); qty=1 + 1 "paul ordered 2 Nintendo switch"
    [order_id=2, product_id=, 17](pk); qty=1 "matt ordered 1 Nintendo switch"

  • @nguyenthu2830
    @nguyenthu2830 2 ปีที่แล้ว

    the sound is not good I am quite disappointed

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

    no one has ever made this any simpler than this video. thanks very detailed, great examples, and thank you

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

    Thanks for your good work

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

    No Address2 for unit, apartment or suite information or an address behind a street front building?

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

    perfect

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

    thank heavens i came across you......i am designing a datbase for django ...and i was completely wrong in my approach and duplicating and throwing htings around all over the place...now im gonna start again and try and get a better design.

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

    So, lets say we have a local business where the # of zip codes is limited but you can have thousands of customers. Would it save memory and increase search speed to store the list of zip codes in a separate table and just have a zip_id field for each customer point to a row in the zip code table, instead of storing the whole zip code for each customer?

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

      Preface this response with 'it depends', but in general you would be adding complexity. Consider looking at this another way - don't store city and use zip code to look up city. For a local business the volume is likely such that the space savings for having a zip lookup would be inconsequential. With regard to speed - adding joins can actually slow down queries so often the design question is balancing space and speed. In other words, saving space in a way that increases joins may slow down response time. So you often find that a gain in one (space) area is a loss in another (speed). Usually it is best to keep your design as simple and flexible as possible so that as it goes through its life cycle you are in a position to be able to adapt/modify the design for new requirements that emerge.
      A zip_id would likely be some type of integer field. The zip code may be an integer or character (international zip codes). So you would be adding an additional field with zip_id that probably consumes approximately the same space as zip code. You would also need to maintain a zip code table that may end up being all zip codes. So bottom line is unless there are unusual requirements I wouldn't create a zip_id field that points to zip code.

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

    Not all heroes wear capes