Normalization

Поділитися
Вставка
  • Опубліковано 15 січ 2025

КОМЕНТАРІ • 28

  • @emmanueldjambatambashe701
    @emmanueldjambatambashe701 3 роки тому +29

    i am sooo disgusted how UA-cam doesn't promote your account , a concept which i have learned in more than a week and still not understand but with simples videos of less than 12 min. i understood everything. thank you sir for sharing your knowledge. i whish you can do more

  • @deepeshkc
    @deepeshkc 2 роки тому +1

    Thanks a ton Prof!

  • @apollyon25
    @apollyon25 2 роки тому +2

    I don't understand why you would add captain_Id back into the shipment entity. Wouldnt that violate 3NF? Because ship_id determines captain_id. You could get that information by joining shipment with the ship relation and then ship with the captain relation.

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

      Because we have previously identified it as a transitive functional dependency. With multiple transitive functional dependencies, each one needs to be satisfied to be able to correctly connect the foreign keys to the primary keys.

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

      @@DustinOrmond I'm still confused, so ship_id no longer determines captain_Id? Why is that still not a transitive dependency? What do you mean by satisfied? Separated into a different entity? Why isn't it correctly connected without including captain_id?

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

      @@DustinOrmond Thank you for taking the time to respond btw, and so quickly no less. I appreciate it!

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

      @@apollyon25 ship_id would still determine captain_id. Have you watched this video on transitive functional dependencies where we discuss all the transitive dependencies covered here? ua-cam.com/video/y7z62tW9MT0/v-deo.html

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

      @@DustinOrmond Yes I did, that's exactly why I'm asking. Shipment_Id determines ship and captain id, while the ship_id determines the captain_Id. That's a transitive dependency unless I'm missing something.

  • @trygvemb
    @trygvemb Рік тому +2

    What program did you use to draw those tables in. It looked like a super helpfull tool to get an overview when working with databases

    • @DustinOrmond
      @DustinOrmond  Рік тому +3

      It is my own custom built application which isn't publicly available yet.

  • @رند-س5ح
    @رند-س5ح 2 роки тому +1

    Thank you so much

  • @fouz1245
    @fouz1245 5 місяців тому

    Thanks a lot, as a beginner to this concept why is Customer ID not the Primary key?

    • @DustinOrmond
      @DustinOrmond  5 місяців тому +1

      Because it is determined by order_id. It is a primary key of the relation CUSTOMER, but not in 1NF.

  • @krisztiantamasi1493
    @krisztiantamasi1493 11 місяців тому

    Thank you so much!

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

    Thank you so much for this! By the way, can you tell us the diagram tool that you're using? Is it online?

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

      It is my own custom made tool. It is not publicly available...yet.

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

      @@DustinOrmond Will it be available soon? Looks like it is very usefull!

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

      @@kaspergos I am not sure at this moment.

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

    Thank you so much for this video, can i ask regarding the 3NF relational model is it ok if i split the description into another table with the price?

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

      I don't really see the need to do that. The attributes of price, description, and finish are all associated with the product. In other words, these are characteristics that describe the product.

  • @邱晨-g5d
    @邱晨-g5d 2 роки тому

    hi i was wondering if the result at the end match the logic model? if im doing a logical model should i just add captain id into the shipment entity thnx

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

      The way I have it at the end is what you should do. You should have captain_id in both SHIP and SHIPMENT referencing captain_id in CAPTAIN.

  • @henriktunedal8075
    @henriktunedal8075 Рік тому

    I watched the video on transitive dependencies and read your other reply about this, but I still don't understand how the last step (adding back captain_id to SHIPMENT) makes sense. If shipment_id uniquely identifies a captain_id (because "shipment_id -> ..., ship_id, ship_name, captain_id, captain_name") then that's no longer true in the final normalized form: looking up shipment_id now leads to two different copies of captain_id with potentially inconsistent values, so a particular shipment_id could e.g. identify captain_id 1 directly and captain_id 2 through ship_id, meaning that shipment_id no longer uniquely identifies a captain_id. What am I missing here?

    • @DustinOrmond
      @DustinOrmond  Рік тому

      We aren't adding it "back". It already existed there but because of the two transitive dependencies, it appears we removed it with one and should add it back to the other. However, this is to satisfy the rule of each transitive functional dependency separately. Yes, you could just join the three tables together, but we were just evaluating based on the transitive functional dependencies alone. Also, this allows us to get captain information without needing shipment information.
      Ultimately, this is just following the rules of transitive functional dependencies. You may argue that you wouldn't need this connection for the future and it might be fine to leave it out.

    • @henriktunedal8075
      @henriktunedal8075 Рік тому

      ​@Dustin Ormond Thank you! I get it now: The video demonstrates the result of strictly normalizing to 3NF which results in the field being kept. Setting 3NF aside though, it does look like a kind of denormalization to keep two mutable storage locations for a single piece of data (captain_id) and thus creating a risk of inconsistencies (but perhaps also better performance because of simpler lookups, as you suggest). Perhaps the copy is removed in higher normalization forms?