DB: How to draw a precedence graph (rules + 3 examples)

Поділитися
Вставка
  • Опубліковано 10 лют 2025
  • From the conversation with Adi Nagara@3rd example:
    You have indeed no global cycle of all transactions. But you have a cycle in T1,T2. You could indeed say, that {T1, T2} (as one entity) and {T3} is conflict serializable.
    Though, in this example I don't look at it in that way. My statement of "conflict serializable" / "not conflict serializable" refers to all transaction. So I mean "all transaction are conflict serializable" or "all transactions are not conflict serializable".
    If you're concerned about exams, you should ask your teacher in which way he wants the statement to be.
    Comment from TNH91 (didn't verify this content yet):
    "If two different transactions contain at least one write and one (read/write) on the same field, then draw an arrow from the earlier to the later."
    Video erstellt mit HyperCam2

КОМЕНТАРІ • 127

  • @mienislav
    @mienislav 2 роки тому +81

    You explained 80% of required transaction knowledge for my retake in less than 8 minutes while my teacher was only reading slides and required us to draw these graphs without explaining a bit. Thank you so much! I hope I will pass tomorrow!

  • @TNH91
    @TNH91 6 років тому +14

    This was a bit clearer to me than the wikipedia entry on the same thing. Mostly because the explanation on Wikipedia is a bit convoluted, but the drawing of the arrows straight onto the visualised stories was an excellent aid as well. More succinctly: If two different transactions contain at least one write and one (read/write) on the same field, then draw an arrow from the earlier to the later.

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

    You made this concept so clear and easy to understand for me . THANK YOU!

  • @kelonyofficialyn_baby1352
    @kelonyofficialyn_baby1352 2 місяці тому +1

    Thanks for your crystal clear explanation. You saved my life

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

    Man, thank you so much, just for some mins I already get it, the way you teach help me a lot, thanks

  • @СлюсарчукОлександр
    @СлюсарчукОлександр 11 годин тому

    all the best wishes to u and your friends and familly. u saved my ass before tommorow`s exam. thx a lot

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

    the simpliest and the best explaination of the youtube

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

    this was condensed and so clear so on point. Perfect.

  • @AyushKumar-gf5th
    @AyushKumar-gf5th 3 роки тому +2

    Thank you. Simplest and best Explanation.

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

    Thank you Thank you Thank you Thank you Thank you Thank you Thank you BLESS YOU SIR

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

    very direct and straight to the point

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

    Thank u so much. You explained so well so effortlessly understood! great job!

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

    Please post more videos like this covering other related subjects. This is way better than my lecturers explanation

  • @allaminehafiz
    @allaminehafiz 7 днів тому

    Thank you sir, it's very clear to understand.

  • @PinkBlanketofficial
    @PinkBlanketofficial Місяць тому +1

    Thanks a ton tomorrow I have my exam thanks a lottttt

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

    Thank you so much man🤩whole explanation within few minutes🔥🔥

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

    Thanks a lot for this short and wonderful explanation ❤

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

    Absolute hero. Thank you!

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

    AWesome bro, awesome. Thanks that you exist!

  • @natnaelsisay1424
    @natnaelsisay1424 16 днів тому

    Short and precise thanks mate

  • @nirmaladilshan4841
    @nirmaladilshan4841 3 місяці тому

    Thank you for helping to do my in class assignment ❤❤

  • @TheLunkan22
    @TheLunkan22 8 місяців тому +1

    Great explanation!

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

    You make it easy!. Thanks from heart!

  • @DavidSchillingMusicOfficial
    @DavidSchillingMusicOfficial 6 років тому +101

    Finally an IT video without an Indian accent. Can't listen to that accent anymore 😂

    • @lerneninverschiedenenforme7513
      @lerneninverschiedenenforme7513  6 років тому +15

      Get ready for "can't listen to German accents anymore" :D // Thanks for your comment above

    • @zaibi558
      @zaibi558 6 років тому +2

      hahahahah jero divided by 1 is jero

    • @pratikgurudatt8867
      @pratikgurudatt8867 6 років тому +26

      Common dude people are just trying to help :) You don't have to be mean. After all its for the sake of learning. For a constructive purpose.

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

      @@lerneninverschiedenenforme7513 But I've got to say, your accent is barely noticeable/recognizable as a German one. At least not compared to the usual German accent. I honestly had a hard time figuring out where you come from (until I saw your channel name of course).

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

      @@Dosenwerfer Thank you :) I'm glad I can hide it :)

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

    Best video for PG , Boss.. Thanks

  • @Aedu-ux7sj
    @Aedu-ux7sj 11 місяців тому

    Got more clear idea about precedence graphs.thank you

  • @kayrauckilinc
    @kayrauckilinc Місяць тому

    A semester worth of knowledge

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

    Best explanation 💯
    Thanks!

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

    5:03 why didn't you take T1: W(B) and T3:W(B) as a conflict. It's on the same object, it's a Write and it's different transactions. Am I missing something?

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

      Eagle mind! Indeed you're right, that is also conflicting.
      I guess I missed it, because the T1:W(B) did already have an arrow.
      However, the final result does not change.

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

    It's more clear 🙌🏻🙌🏻🙌🏻

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

    Thanks for wonderful explanation

  • @pehanhettiarachchi
    @pehanhettiarachchi 3 місяці тому

    Thanks you for this valuable video❤❤❤

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

    sehr nutzlich video, er hilft mir in meine prufung, Vielen Dank und tut mir leid fur meine schlechte Deutsch

  • @h.montet1579
    @h.montet1579 2 роки тому

    Awesome explanation, thank you !

  • @_BushraPathan-ek3zk
    @_BushraPathan-ek3zk 2 роки тому

    Thank you for amazing explanation

  • @HM-he1ob
    @HM-he1ob 2 роки тому

    so cool! solved my questions in 30 sec

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

    fire bro, thank u for this

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

    Man. this is so helpful thank you !!!!!!

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

    Excellent !!

  • @ekarata.361
    @ekarata.361 Рік тому

    what, my prof takes 2 class (6 hours) to explain this and I still don't understand but you can explain them in 8 mins video !!

  • @sherrywinfield2205
    @sherrywinfield2205 4 роки тому +6

    Man! This is awesome! Thanks! Better than my prof... is there any more? About Xact and especially QEval?

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

    Thanks. clearly explain.. ❤

  • @AdiNagara
    @AdiNagara 6 років тому +7

    Hello, I would like clarify something in the third example you gave... It seems to me that there is no cycle in the graph, therefore the transactions are in fact conflict serializable. In any case, thank you for sharing!

    • @lerneninverschiedenenforme7513
      @lerneninverschiedenenforme7513  6 років тому +3

      Why do you think there is no cycle? :)

    • @lerneninverschiedenenforme7513
      @lerneninverschiedenenforme7513  6 років тому +11

      ah! Now I think I understood, what you're talking about. Very precise! You have indeed no global cycle of all transactions. But you have a cycle in T1,T2. You could indeed say, that {T1, T2} (as one entity) and {T3} is conflict serializable. Well spotted :)
      Though, in this example I don't look at it in that way. My statement of "conflict serializable" / "not conflict serializable" refers to all transaction. So I say "all transaction are conflict serializable" or "all transactions are not conflict serializable".
      If you're concerned about exams, you should ask your teacher in which way he wants the statement to be.
      does this solve your question?

    • @AdiNagara
      @AdiNagara 6 років тому +1

      Thank you for the clarification. Look forward to more videos to come!

    • @lerneninverschiedenenforme7513
      @lerneninverschiedenenforme7513  6 років тому +2

      :) Thank you for looking with a detailed eye!

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

    It was really helpful.. but if you could talk about the degree and order of the graph that would have been absolutely awesome!

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

    Urm why are you better than my lecturer, whom i pay NINE THOUSAND POUND FOR . Thank you

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

    This was easy to understand thank you

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

    Thank you so much! This was very helpful.

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

    Thank you so much !

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

    thankyou so much!

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

    Thank You So Much

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

    Very halpfull 😍 thank youuuuu

  • @meenakshisamg1554
    @meenakshisamg1554 6 років тому

    In second example at 4:12 we need not to connect t1 read(a) To t2 write(a) as t1 has committed before this write yet the transaction is conflict serializable

    • @lerneninverschiedenenforme7513
      @lerneninverschiedenenforme7513  6 років тому

      I learned it in a way, that commits do not matter in this regard. Can you name sources, that say you need to take the commit into account?

    • @meenakshisamg1554
      @meenakshisamg1554 6 років тому

      @@lerneninverschiedenenforme7513 then I request you to plz tell the function of this commit in transaction

    • @lerneninverschiedenenforme7513
      @lerneninverschiedenenforme7513  6 років тому +1

      Meenakshi Samg TBH I'm totally with you here, regarding logic. I don't know the background why, but the commit should be ignored. I advice you to compare it to your other sources.
      I also advice you to use a different language "I request you" would be better off as "I'd like to ask you...". The former is not too suitable here.

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

    was very helpful. cheers!

  • @Pranati.A.P
    @Pranati.A.P 9 днів тому

    What if there was a cycle between 2 transactions T1 and T2 but of different data items? Will it still be conflict serializable?

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

    Can we say, at 5:50, not conflict serializable, if the T1 to T2 reversed? say if the arrow direction is from T2 to T1?

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

    in the last example why do you say it is non conflict serializable? T1,T3,T2 does not complete a full cycle, but T1 and T2 does.

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

      As far as I remember: As soon as there is *any* cycle, it becomes "not conflict serializable"

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

      @@lerneninverschiedenenforme7513 not it is not right , please check , I mean we need to consider all three transaction are making cycle or not , please check and inform me

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

    thank u so much !

  • @MonikaKumari-er4de
    @MonikaKumari-er4de 2 роки тому

    Thank you

  • @wafawafa1592
    @wafawafa1592 Місяць тому

    THANK YOUU

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

    I like your explanation. Just one question: Why should we ignore the commits in 5:25 ?

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

      Thank you. Tbh, I don't know why. I just figured, you need to. I think it might make sense in a real-life situation with a slightly broader view on the topic. But I can't say for sure.

  • @SanjuOjha-g6v
    @SanjuOjha-g6v Рік тому

    i just want to know that if their is any cycle is available then their is no conflict serializable. if their is no. of cases then what happened such as T1, T2, T3, T4, T5 then how we defined it for non conflict or conflict serializable?

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

    I love you sir

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

    thanks😀

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

    But how does this method deal with dirty reads (transaction where your read it from aborts and resets value)? In practical situations you can't know from before if a transaction will commit or abort.

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

      I can't give an educated answer to this question.
      I would foolishly assume, that this model doesn't care about dirty reads.

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

    You did not explain those with Abort in it.

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

    Great video. but I still have a queation, you said we dont need to care about commit, what about abort. For example, we have a schedule, T1:W(x),T2:R(x),T1:W(x), T2:abort,T1:commit. Is this schedule conflict-serializable or not.

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

    spoiler alert: it did help

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

    why would you ignore the commit? After a transaction commits it cannot be in conflict with other transactions

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

      TBH, I don't know why. I just figured, you need to. I think it might make sense in a real-life situation with a slightly broader view on the topic. But I can't say for sure.

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

    If you have 3 nodes in total but there is a cycle between T1 and T2, does the same rule apply? I mean is it still not conflict serializable even though there is an '''''empty'''' node?

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

      That's basically what's happening in example 3 (7:10). Except, that the "empty" one is also refered. But that does not change the situation.

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

    it helped tnx

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

    my man

  • @digitaldiary9410
    @digitaldiary9410 6 років тому

    Why are you not taking W-W operation? Please clear my doubt...I am new to this topic!It will be helpful for me!

    • @lerneninverschiedenenforme7513
      @lerneninverschiedenenforme7513  6 років тому

      I should. What time of the video are you talking about?

    • @DavidSchillingMusicOfficial
      @DavidSchillingMusicOfficial 6 років тому +1

      You are supposed to take any operation which is applied on the same object where both are in different transactions AND there's at least one write operation. If you are referring to the first example, he wasn't taking the W-W operation because one transaction was applied to X while the other was applied on Y. And thats irrelevant.

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

    Hey!
    What would you say about the following schedule?
    R1(X)R2(Y)R3(Z)W1(X)W3(Z)C1W2(X)W2(Y)C2R3(Y)W3(Y)C3
    I got in my assignment and I'm quite confused about whether it conflicts serializability or not..

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

      Yes, it is conflict serializable. There are no cycles between T1, T2 and T3. The graph would be T1->T2->T3.

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

    I didnt get why 1st example not conflict serializble but the 2nd one ?

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

    What happens if read and write is executed on the same data at the same time from two different transactions?

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

      I can't answer this question.
      Actually an interesting question. I guess the question is too advanced, so universities do not handle it...?

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

    how can i find the schedule if i have the graph?

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

      Sorry, but unfortunately I can't help you with that. I'd say in one case, you can do them in parallel and in the other one you have to do them one after another. ← this might be correct, but I didn't think it through. You should check again, somewhere else.

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

    Behold our god

  • @you-td9sl
    @you-td9sl 5 років тому

    can you please help me to solve an exercise please? how can I send it to you plz plz
    how to draw the precedence graph for this:
    R1(A) R4(A) R4(B) R3(A) R3(B) R2(A) R2(B) R3(C) W1(A) R1(B) W1(B) W4(A) W4(B) W3(A) W3(C)
    my solution is:
    T1 go to T3 and T4
    T2 go to T1 and T3 and T4
    T3 go to T1 and T4
    T4 go to T1 and T3
    is it correct?

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

      Can you upload an image , that shows transaction and actions (R/W) as in the video. Can you also draw the arrows as in the video?

    • @you-td9sl
      @you-td9sl 5 років тому

      @@lerneninverschiedenenforme7513 thank you for your reply,
      here is the exercise:
      www.dropbox.com/s/9tv8ypnbwo5nafs/Exercise.pdf?dl=0
      and here is the solution of the first question
      www.dropbox.com/s/9tv8ypnbwo5nafs/Exercise.pdf?dl=0
      I want to know if it is correct, and if you can help me to understand and solve the rest. thank you very much.
      ps: the exercise was translated from french to english so, I hope u understand my translation.

    • @you-td9sl
      @you-td9sl 5 років тому

      @@lerneninverschiedenenforme7513 so?

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

      @@you-td9sl You linked the same document twice. Your answer is not included. I would say it's not conflict serializable, as there is a cycle between T1 and T4; T3 and T4; T1 and T3; T1 and T3 and T4; ...

    • @you-td9sl
      @you-td9sl 5 років тому

      @@lerneninverschiedenenforme7513 oh sorry, here is it:
      www.dropbox.com/h?preview=transaction.jpg
      it's not serialisable, check the answer and correct me plz if it is not correct.

  • @HexDaGen
    @HexDaGen 28 днів тому

    I love you

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

    t1 V t2 is conflict serializable. not, non-conflict serializable.
    right/

  • @mr.mentpolynopeace
    @mr.mentpolynopeace 5 місяців тому

    Ok bro

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

    you beauty

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

    there isn't a cycle

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

    We taught damned algorithm which made so sense.
    Thank you very much for this!!! ❤
    I think college's sole purpose is to make our lives complicated by making simple things complex! 🥲