Lec-95: Numerical Example on I/O Cost in Indexing | Part 2 | DBMS

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

КОМЕНТАРІ • 196

  • @mridulayadav997
    @mridulayadav997 5 років тому +67

    No need of coaching classes your teaching style is superb ......thanku so much sir 🙏

    • @GateSmashers
      @GateSmashers  5 років тому +20

      Thank You so much for the appreciation. Bless you. keep learning and sharing

    • @ayushibansal6635
      @ayushibansal6635 3 роки тому +2

      did u clear gate??

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

      ua-cam.com/channels/S5cAoAFGB6-aUzbesg2svg.html

    • @learner5915
      @learner5915 3 роки тому +2

      @@ayushibansal6635 yes 👍

  • @three856
    @three856 4 роки тому +14

    Your analogy to real book made the concept clear ..sir..thank you

  • @exclusivefacts8956
    @exclusivefacts8956 3 роки тому +27

    Today I cracked my viva due to your all lectures on dbms , really i thankful to you 🙆‍♀️ sir

    • @GateSmashers
      @GateSmashers  3 роки тому +8

      Excellent

    • @ZainAli-ih1mn
      @ZainAli-ih1mn Рік тому

      ​@@GateSmashersl think you did not write the correct answer for dense index because for dense there is only linear search available for non order it's ans I think will be 200 + 1

  • @ladiharish7843
    @ladiharish7843 3 роки тому +31

    for sparse indexing when we find the block, then we again need to search 4 records with in that block soo the worst case for sorted records is will be (log50)+log(4)=7.64~8. Not 7 as mentioned. Also in dense case we can't apply log because the data is unsorted in dense.

    • @vasireddyganesh
      @vasireddyganesh 3 роки тому +3

      Yeah I too got same doubt... How could we apply log in case of dense..

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

      Ya, for dense it won't be possible to use binary search

    • @abdullahalfahad3732
      @abdullahalfahad3732 2 роки тому +5

      I think we don't need to search 4 times in sparse when coming to the data table in hardisk because data is ordered. A normal addition will help to find the data.
      but there's a problem in dense.
      let's assume the pointer table is ordered in dense but even then it doesn't make sense to add 1 because the main table's data isn't ordered so we'd need to add 4 instead of 1.

    • @anamshahzadi8722
      @anamshahzadi8722 Рік тому +4

      He said at start within block Indexing fast nai krti... Its all about I/O cost. Index table to Hard disk miss/hit ki bat hei... within block nai...

    • @mollamohammadibrahim5442
      @mollamohammadibrahim5442 10 місяців тому

      Your are right. This is the answer of the doubt.@@anamshahzadi8722

  • @RutvikkKharod-ne6tz
    @RutvikkKharod-ne6tz 26 днів тому

    I have been learning from your channel since 2021 and I got through my master's because of you and came back to revise the concepts for a Job interview. Thanks sir. Truely legendary teaching.

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

    The way you explain things, so far the best I've come across. Thank you for saving my time and I don't feel pressurised at all while learning rather it feels great!! Big shoutout to this channel!!

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

      same! I only know alittle hindi from watching indian movie, but when I learn from him, he is such a good teacher!

  • @aaravgavshinde
    @aaravgavshinde Рік тому +9

    For those who are having doubt and think in dense it should be 200 + 1: Keys in the index table are arranged in order to make it easier to search the records, so that we can use binary search. Hence lg(200) + 1

    • @ZainAli-ih1mn
      @ZainAli-ih1mn Рік тому +1

      Yes you are right

    • @abhishekjain-tc3vy
      @abhishekjain-tc3vy 11 місяців тому

      But If we see acc. to you, we have to make index table sorted which takes extra time.
      Apart from these If you google search you would know that Dense Indexing is Faster than Sparse.
      Google:
      Dense indices are faster in general, but sparse indices require less space and impose less maintenance for insertions and deletions.
      @gatesmashers Sir please make a pin comment every one is clear for this lecture

    • @ZainAli-ih1mn
      @ZainAli-ih1mn 11 місяців тому

      @@abhishekjain-tc3vy no you are wrong sparse is faster then dense index

    • @abhishekjain-tc3vy
      @abhishekjain-tc3vy 11 місяців тому

      ​@@ZainAli-ih1mncheck in Google

    • @abhishekjain-tc3vy
      @abhishekjain-tc3vy 11 місяців тому

      And also in indexing we have to short the index table that is to be add while calculating the time complexity

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

    Just amazing, how much effort this guy has put in, you have literally saved CSE engineers not going to lie sir...

  • @eshaangupta4101
    @eshaangupta4101 3 роки тому +2

    The Book analogy was an eye opener. Great explanation!

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

    The way of explanation is Awesome...शुक्रिया सर..:) Waiting for another video..

  • @vivekkumar-zk5ik
    @vivekkumar-zk5ik 4 роки тому +3

    Sir u r really doing great job. Ur smile starting from video and after giving so much effort you end video with smile . It's really spread positive vibes.....Thank u for teaching us...

  • @syedabbas749
    @syedabbas749 5 років тому +2

    Truly stupendous !!! Just completed all your 63 uploaded videos on DBMS. My DBMS fundamental have become more stronger. Thanks a lot Sir :) :)
    Just one request- As soon as you complete the DBMS course, kindly upload NET DBMS Solutions for past papers. Thanks again:)

  • @ashutoshbang8812
    @ashutoshbang8812 Рік тому +1

    Excellent Explanation... Hats Off to your efforts...

  • @vickymore8752
    @vickymore8752 5 років тому +3

    Sir you are doing best Please continue You will be the best You tuber in 2019

  • @bubblebath2892
    @bubblebath2892 7 місяців тому

    Man you are phenomenol ....such detail and accurate teaching .....rendered me speechless ...awesome bro

  • @shubhankarbhadra131
    @shubhankarbhadra131 3 роки тому +31

    I think there is a mistake in the end part of the video when I/O cost is being said for dense entry. Since it is unordered, there will be no concept of binary search, so it should be 200 searches in index table and 1 search for the corresponding hit in the index table. === (200 +1). And the average answer will be 200/2 = 100.

    • @chiragjaiswal9387
      @chiragjaiswal9387 3 роки тому +10

      Bro You really helped me at 4:42AM...I'm also thinking about but you assured me that i'm not alone and make me feel right....Thanks for Sharing

    • @jeevanaadhaar-mereprabhu
      @jeevanaadhaar-mereprabhu Рік тому +3

      True same doubt I also got

    • @ffaheem
      @ffaheem Рік тому +14

      The key values will be inserted in sorted manner in the index table and they will be pointing to the corresponding block
      So, I believe we can do binary search in index table that will give us the block and then we can load the entire block in ram and then search for our key
      so it will be log2(200)+1

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

      But after indexing we are searching in index file so it is sorted the main file was unsorted

    • @SachinPatel-ff2or
      @SachinPatel-ff2or Рік тому +1

      In dense we have made index table for all 10000 records not for 2500 blocks, So we can make it ordered and then can apply binary search. So sir is correct.

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

    Bhai ye underrated video hai, most important I can say

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

    simplicity in one word "superb"

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

    simply awesome !!!!! The way of explaining is superb, Thanks!

  • @waishanichowdhury6106
    @waishanichowdhury6106 4 роки тому +5

    Sir,as you said dense is for unordered data so in that case time complexity should be of O(n) but why u did log200+1, according to concept it must be 200+1 due to linear search for unordered data.

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

      index table is sorted.. I don't think sir explicitly told this but binary search is only applied on sorted list

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

      @@syedalmastirmizi3477 Index table is not sorted. No where mentioned.

    • @RohitMishra-ox6oy
      @RohitMishra-ox6oy 4 роки тому

      Index is always sorted ...watch once again he clearly said that if index is nit sorted then there will be no diff in searching with or without indexing

    • @RohitMishra-ox6oy
      @RohitMishra-ox6oy 4 роки тому

      For confirmation

  • @oshniklife9661
    @oshniklife9661 5 років тому

    Sir coaching ki jarurat hi nahi hai....simply wooooooow

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

    He is a true genius. None can deny that

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

    I have a doubt about the case of Dense. In the case of Sparse, the data is ordered and there we can apply the binary search but in the case of unordered(Dence) the data in the Index table is also not sorted in such case we can't apply the binary search.
    I think in dense case it should be N ( which is 200 in the example case which is far less than 2500 earlier and far efficient).
    I might be wrong. Please correct me in case I'm wrong.
    Thanks

    • @tejasghone5118
      @tejasghone5118 3 роки тому +5

      Index table is sorted but the data isnt hence logn

    • @siddharthvs1770
      @siddharthvs1770 2 роки тому +3

      @@tejasghone5118 But we are binarily searching for value.... Not the index....We don't need to search the index as its already in sorted order and can be reached in o(1) time just like array element.

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

      The keys which are copy of PK or CK from the records in hard disk are sorted in index table, so we perform binary search on keys then the pointer associated with a perticular key get us to the exact record

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

      Yaa exactly the same doubt he is wrong there

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

    I have never ever ever ever ever...seen a techer like you...🙏☺️ Sir ji

  • @abhinavg916
    @abhinavg916 5 років тому +4

    Please make lectures on Theory of Computation and Formal Languages i.e AUTOMATA. We need teachers like you to teach us. We want to understand concepts, not for preparing exams. Thank you for Computer Networks Lectures, I learnt from those videos and feel confident in it.

    • @adishjain3309
      @adishjain3309 Рік тому +1

      I would suggest video lectures from sipser, lol you prolly has been graduated by now

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

    This man deserve more view and more likes ... thank you so much sir for saving our future

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

    Thank you Sirji, very well explained, and understood, I have subscribed and have recommended to friends too.

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

    Sir aapka bahut bahut shukriya mere DBMS pakka krne ke liye 🙏🔥

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

    thanks for sharing your tremendous knowledge with us

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

    It's amazing sir.Your videos are always up to the mark and help me a lot .There is no other coaching classes required .All the doubts are always clear here .😀😃😃

  • @BiddyutHasan
    @BiddyutHasan 5 років тому +1

    Beautiful teaching style...

  • @AshishYadav-ey2vv
    @AshishYadav-ey2vv 8 місяців тому

    sir you are the best teacher for computer science

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

    Good Lecture Sir :)
    Having one doubt here :
    without indexing, we are not considering searching inside a page, only I/O operation is considerable.=>fine
    with indexing => when unsorted => not considering searching inside a index page => log200 + 1 =>fine=>
    because here we have to find the right page pointer.
    with indexing => when sorted => we have to consider searching inside an index page also because that's the only thing which gives us right DB page =>
    so here time will be log50(searching right page among 50 pages) + log50(searching right record among 50 records) +1
    Please correct me, if I made any mistake here.

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

      Bhai Unordered ya dense vale case me sir ne binary search kaise laga di kuki data sorted nahi hai to binary search kaise laga rahe hai...... yahi doubt hai mera!

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

      same doubt

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

    you do a great job, thanks a lot sir

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

    In dense indexing the records are un ordered then how can we use binary search

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

    really very good explanation.. I saw both videos part1 and part 2

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

    Sir, your videos are just awesome. Please keep it up.

  • @sratnamanjari244
    @sratnamanjari244 4 роки тому +1

    Thank You So Much Sir

  • @ashutoshbang5836
    @ashutoshbang5836 4 роки тому +1

    Awesome videos. Thank you so much :)

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

    Hello sir, in 8:59 how can we get a block in log2(50), when each block of index itself contains 50 blocks of hard disk ( in case of spars ) rather we get bulk of 50 blocks and to get the required block we have to again binary search in that block of index therefore to get the required block we have to search again log2(50) after this we will get successfully our required block, therefore total time complexity of searching in index is log2(50) + log2(50) which is log2(2500), and after this time we will again search our required record in that particular block.
    Correct me if I'm wrong, and thank you sir for this amazing series.

  • @avinashaspana179
    @avinashaspana179 5 років тому

    Sir, thank you so much for the video. It explains indexing clearly and very informative.

  • @MastiManiaTV
    @MastiManiaTV 4 роки тому +9

    dense main +1 nahi aye ga aor log 2 200 nahi aye ga keun k data sorted nahi he. baki you did well. keep doing

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

      explain your points please

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

      He is right dense is for unsorted so we would use l linear search(O(n)) and binary for sorted(log n )

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

    Excellent presentation...👏👏 you deserve more subscribers and views than what they are today...

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

    DBMS my favourite subject because of You sir
    Thank you

  • @mdaniquzzaman8120
    @mdaniquzzaman8120 10 місяців тому

    Masallah your explanations is excellent ❤❤❤

  • @shrutiart4127
    @shrutiart4127 5 років тому +2

    explanation mast h sir, Sir plz computer organisation k videos upload kardiye plz sir

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

    Ur teaching style is fantastic.....i loved it.....plz make videos on Ugc net unit 1 (discreet structure and optimization)

  • @Anonymous-yk1eh
    @Anonymous-yk1eh 2 роки тому

    * In dense , why 1 is added * as in sparse it require further search in page but in dense it have all records.

  • @ayushikatroliya1473
    @ayushikatroliya1473 9 місяців тому

    Please add dense and sparse indexing also in title. This will help students who will come in future.

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

    DOUBT - log(50) gives the corrosponding block and not the index for next block
    we need log(50) * log(50) ( or log(2500) better )to get index from index table

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

    i think searching time in DENSE index should be O(200)+1 rather than log(200)+1 ?

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

    Brilliant lecture.

  • @adityaanand5447
    @adityaanand5447 3 роки тому +2

    Sir, at 9:09 it should be [log50] + [log4] = 8, as there are 4 records(sorted) in each block.

    • @VikashKumar-ug5jx
      @VikashKumar-ug5jx 3 роки тому +4

      he only considered the no. of blocks needs for searching.

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

    For Dense shouldn't it be O(n) because of linear search? We can't apply binary search here.

  • @sayandey1478
    @sayandey1478 5 років тому +4

    Dense me log +1 kuyn, + 1 to nahi chahiye na? ptr per record to hain hi, phir hard disk me kuyn search kare?

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

      Bhai dekh dense me bhi tuze starting Ko sirf required index value hi milegi , par tuze main value find out karne ki liye us index value pe to Jana hi hoga na , so udhar jane ki liye tuze Aur 1 bar search karna padega isliye + 1 Liya hai ..

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

    Thnx u paji bohat badiya

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

    superb

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

    Sir, in case of mapping in dense indexing, all the 10000 records that get mapped into all the 200 index table blocks would still be UNORDERED. Thus, traversing them would require a time complexity of O(n) rather than O(log n), as in the index table we would need linear search, don't you think? Please comment.

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

    log(200) cant be done in unordered it should be 200/2=100 for unordered i.e. dense

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

    thank you sir

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

    In dense indexing we can directly go the record why it will be log200 if data is unordered ?? Please verify last part of the video

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

    Best........Thanks a lot🙏

  • @manpreetkaur-lx9ci
    @manpreetkaur-lx9ci 5 років тому +1

    Thanks Sir.

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

    Nice explanation sir

  • @world_of_programming9653
    @world_of_programming9653 8 місяців тому

    Sir, why we use log based time complexity in unordered list (Dense)

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

    Sir mein sirf apki videos follow kar Raha hai ye videos comptetive exams ke liye sufficient hai .

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

    i am bit confused...
    for dense will the unordered data be stored in ordered form in index pages?

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

    10:27 Why we are calculating the log2 (200) as we are using dense and records are unordered and cant use binary search.

  • @aarjavjain3074
    @aarjavjain3074 6 місяців тому

    How can dense searching take log time when data is unordered?
    Isn't binary search applicable for ordered data only?

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

    Excellent sir

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

    can we store the index as a hashmap? then the searching would be constant and not logn.

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

    can anyone explain me that why we take the size of index block same as that of hard disk block ?? why not different ??

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

    how come sir, we are using binary in case of Dense as it is unordered it will have normal liner search?

  • @devenderk.2745
    @devenderk.2745 4 роки тому +3

    Sir, Thankyou for the best lecture videos, Your teaching skills are above the level, from that elementary class students can also understand the same.
    Sir but i hv 1 doubt: At Duration(in Video): 9:10
    u said that we have to search 6 + 1 . But when we approached to M.memory then why are adding 1 search only for it, as within the blocks there are no. of records(In our case its 4). Please tell me ??

  • @ManishKalyan-gx2wi
    @ManishKalyan-gx2wi Рік тому

    why log(200)+1 in case of dense searching as data is unordered in index table..it should be avg of 200+1, right?

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

    Thank you for the videos sirrr..

  • @shah12155
    @shah12155 5 років тому

    Dear sir indexing in your 3 lectuers are 101% clear but plzzzzzzzzzz explain b tree and b+tree and as well as hashing topic......

  • @abdullahmoiz8151
    @abdullahmoiz8151 5 років тому

    excellent explaination

  • @Johnny_sinswa
    @Johnny_sinswa 4 місяці тому +1

    Non ordered me toh linear search lgega na toh usme log200 kaise hoga log toh binary search ke case me aata tha na.........isme toh 200 aana chahiye worst case me 🤔🤔

  • @i.m.anonymous8492
    @i.m.anonymous8492 4 роки тому +1

    Bhaiya just wanted to know, are entries in Index Table always sorted?

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

    Too good😍

  • @Lallu-gv9rs
    @Lallu-gv9rs 7 місяців тому

    Hello ! Can anyone tell me whether this playlist would be enough for doing a course which has hands on project ? Please tell me. Thank You.

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

    I think there is some mistake in dense index table because you said we are scanning in each pages of page table after doing binary search but if we are not able to find the required page in that block then where we need to go because data is sored in unordered fasion.

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

    Even in sparse we have to search in all 50 blocks then again for 50 entries

  • @naimishmanzar5005
    @naimishmanzar5005 5 років тому

    please make videos on algorithms ur explanation is good

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

    10:44 whty are we taking log(200) the data is unordered so avg time should be 200/2 = 100 or simply O(no. of index blocks) ?

  • @LaxmiKumari-pc9rr
    @LaxmiKumari-pc9rr 4 роки тому

    Thank you sir👍

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

    Index table me Binary search kaise apply ho raha hai. Please explain

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

    sir....thanks a lot !

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

    yeh ek accha video hai

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

    Superbbbb 👍

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

    sir can u please explain why have u added extra plus 1 to search a record in a block in indexing search where as in last lecture video in binary search of n =2500 (here n is number of blocks ) we got log2^n =12 where u haven't added plus 1 but in this case also we do search for block and after getting that particular block we should search of particular record only .

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

    sir first you are saying dense indexing is used when data is unordered . so why at last you are doing binary search on record and giving ans as log(200) + 1, ans should be 200 in this case acc to me . Please help me to clear this doubt please.

  • @RiteshKumar-ud7bf
    @RiteshKumar-ud7bf 3 роки тому

    Sir at 10:27 log200 base 2 value is not 8 but it is 7.64

  • @himanshujain5670
    @himanshujain5670 5 років тому

    nice explanation

  • @kunalsingh5794
    @kunalsingh5794 5 років тому +1

    Sir, please give the serial no means sequence no of all videos.....

  • @sajansekhu8785
    @sajansekhu8785 5 років тому +1

    sir pls a make on a vedio of past year ugc net exam..

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

    Thank you!!!

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

    tussi great ho paajiiiiiiii😁😁

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

    Sir Plz take a class about RAID