UHCL 36a Graduate Database Course - Linear Hashing - Part 1

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ส.ค. 2024
  • This video corresponds to the unit 7 notes for a graduate database (DBMS) course taught by Dr. Gary D. Boetticher at the University of Houston - Clear Lake (UHCL). The focus is on physical database design. This video looks at linear hashing. This is part 1 of 2.

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

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

    Quite a wonderful set of tutorials. Sadly, not many professors have your gift of being able to explain these (not so hard after all) concepts. Many thanks!

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

    Thank you for this video. I wasn't sure if I understood everything the first time in course but now it's cristal clear for me :) Thanks a lot!

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

    Another lifesaver!
    Thanks again Gary and keep these great vids coming :)

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

    Dr.Boetticher you are an amazing teacher!!Thank you for uploading videos like these...

  • @KonstantinosKonstantinidis1993
    @KonstantinosKonstantinidis1993 10 ปีที่แล้ว +11

    I think that in 5:13 he meant "10 mod 4" not "10 mod 2"

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

    Great video on linear hashing, definitely made it a lot more clear for me, much thanks.

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

    Studying for finals and this definitely helps! Thank you!

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

    Thanks for this video! Really helped me understand the concept!

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

    much clearer- thank you!

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

    Good video. The splitting + rehashing step confused the hell out of me before this lol.

  • @DarkScionify
    @DarkScionify 11 ปีที่แล้ว +5

    actually the formula for this mod 2 to mod 4 change is: k mod (Nx 2^L)
    N is the number of buckets (doesnt change after split) and L (Level) shows how much this file is doubled. So in this case after the first split L = 1 which means: k mod (2x2) -> k mod 4

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

      according to this logic after the second slipt it shoudve been l=2 and 2^2 =4 MEANING 2*4 = 8 but it didn't change.

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

    freaking amazing, he should like the best teacher of youtube!!!

  • @DeepakS64
    @DeepakS64 10 ปีที่แล้ว +2

    I did not understand why you took mod2 in the first split. Please help.

  • @Ben-rc9br
    @Ben-rc9br 7 ปีที่แล้ว

    Nice explanation. Thanks.

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

    I think what may be throwing people for a loop is the property of modulo. If you don't get that you won't be getting this video. Notice if something is %2=0, there is only a 50% chance (avg) that is %4=0. So by adding another bucket that is twice the factor of the previous modulo, in the process you split the modulo. Note: something can be crafted that doesn't. For instance, what would happen if you inserted 256 (divisible by 0,2,4,8,16,32,64,128), 10 times. I assume you'd split until you were under the capacity, and then you'd have a few overflow buckets for a long time.
    Really cool video. I'm local in Houston. Definitely want to meet sometime.

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

    You sir are a legend!

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

    so mod 2 determines placement, sorted by odds & evens??

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

    Thank you so much... Very much useful

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

    Thank you for the video.

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

    BEST VIDEO EVER

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

    Awesome! Thanks a lot!

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

    very clear explanation. way better than the paper and my teacher XD

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

    as far as i know you determine the function to use according to n, the bucket to be split. specifically you first check appropriate number of last bits which is largest k that satisfies # buckets >= 2^k. In that case it is 1 since there are 3 buckets. Then you check last k bits. If it is smaller than n you consider last k+1 bits for the function, ow you consider last k bits as the function. In this case n=1 so if last bit is 0, use last 2 bits 2 hash. ow use last bit to hash.

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

    He says you need to check all elements if they fall into the new bucket. But IMHO the key idea to linear hashing is you do not have to check all elements in case of a split. You only need to redistribute the elements in the Bucket (including its overflows) which is splitted. Otherwise the table would get much slower the larger it gets.

  • @1ma4ighter
    @1ma4ighter 13 ปีที่แล้ว

    hey Gary, great video, i'm doin some late studying and this video helped majorly, i'm from south africa btw, there's just one thing i don't understand though :: i AM writing this evening after work but i'd still like to know: - innitially we would calculate the position of the value to add using (v mod 2), after the split happened the n pointer moved on bucket down and the value to mod with increased (2fold | by2)? ie: 4, but remained the same for the bucket to split ie: 2.

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

    at 5:09, in bucket 0, what if the 10 were a 11? 11 mod 4 remains 3, but the bucket id is up to 2, where to put 11 in this case?

  • @1ma4ighter
    @1ma4ighter 13 ปีที่แล้ว

    could you please tell me why or/and how they increase and when i would do it please, thanks

  • @CvDb-mt4dl
    @CvDb-mt4dl 7 ปีที่แล้ว

    Thank you very much..!!!

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

    really helpfull!!

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

    how do you know which hash function to use? After he adds 10 and there are buckets 0-2 he says bucket 0 and 2 use mod4 but bucket 1 still uses mod2. How do you know which hash function to use before you actually hash it....?

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

    why we reset next to zero? If someone can help me to this step

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

    thanks a lot!

  • @bmgag19
    @bmgag19 10 ปีที่แล้ว +7

    so when he first hashes, he does 10 mod 2 because there are 2 buckets. that makes sense. but then when he needs to split and rehash, he does mod 4 on the first bucket, mod 2 on the second bucket, and mod 4 on the last bucket. why does he do this? why doesn't he do mod 3 for all the buckets because now there are 3 buckets?

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

      +bmgag19 Because then he'd have to rehash not just the elements in the bucket that was split, but *all* the elements in the table in its entirety. That's slow. At least, that's my understanding.

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

      The records originally in bucket 0 are distributed between the
      two buckets based on a different hashing function hi+1(K) = K mod 2M --- quoted from Ramez Elmasri

  • @user-od4pf8et2z
    @user-od4pf8et2z 9 ปีที่แล้ว +2

    As below the guy, That's exactly what i dont understand too. I couldnt get it clear that why he did the mod 4 not mod 3 and even it is true, why he did not the mod 4 on the second bucket.

    • @weaklyinformative
      @weaklyinformative 9 ปีที่แล้ว +6

      In linear hashing, buckets are split one at a time. The change from mod 2 to mod 4 bears the idea that it is relevant to look at one more bit in the key, since we are splitting this bucket into 2 ( alpha mod 2 is the same as looking the least significant bit of alpha, while alpha mod 4 is the same as looking the 2 least significant bits in alpha).

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

    15 mod 4 = 3
    It has to go in bucket Nr.3, which is also missing

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

    gary the goat

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

    great. but you dont really explain why you cange n, or why you change from mod 2 to mod 4. Is h(K) = K mod 2^i, where i is the number of splits you made? its a bit diffuse

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

    Merci:)

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

    Thanks you for this useful video

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

    dayı büyüksün thanks a lot!

  • @bmgag19
    @bmgag19 10 ปีที่แล้ว +18

    There are just too many unexplained things in this video. I don't get how this is getting so many thumbs ups.

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

      This is at least 200 times better than my lectures slides.

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

      This video is quite good.

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

      Nothing is perfect. There is no perfect lesson for every student. Feel free to ask a question. And if you think something is explained elsewhere better please clue us off and bask in the upvotes.

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

    Anyone from 2024?