1 00:00:01,530 --> 00:00:09,360 ‫Let's talk about the first property now that we understand transaction at City, Atama City is came 2 00:00:09,360 --> 00:00:18,630 ‫from the word atom right in science or is an atom is the smallest piece of a unit that cannot be divided. 3 00:00:18,630 --> 00:00:23,040 ‫You cannot divide an atom unless you're doing a nuclear fission and all that stuff. 4 00:00:23,040 --> 00:00:28,020 ‫But let's assume atomic atom cannot be divided, cannot be split. 5 00:00:28,170 --> 00:00:30,690 ‫And that's what a transaction as a transaction should be. 6 00:00:30,690 --> 00:00:31,380 ‫Atomic. 7 00:00:31,500 --> 00:00:37,930 ‫When we say a transaction as atomic, that means all of those queries should succeed. 8 00:00:38,280 --> 00:00:41,420 ‫And if one of them fail, you better fail the whole thing. 9 00:00:41,610 --> 00:00:43,110 ‫You better roll back the whole thing. 10 00:00:43,230 --> 00:00:44,760 ‫And now we know what a rollback is. 11 00:00:45,010 --> 00:00:45,940 ‫Does that make sense, guys? 12 00:00:46,200 --> 00:00:48,090 ‫Very simple concept. 13 00:00:48,750 --> 00:00:50,480 ‫OK, why does it matter, though? 14 00:00:50,490 --> 00:00:51,920 ‫Why does it matter? 15 00:00:51,930 --> 00:00:53,210 ‫Why should I care? 16 00:00:53,600 --> 00:00:54,720 ‫Why are you enforcing that? 17 00:00:55,020 --> 00:00:55,800 ‫Or are you going to know? 18 00:00:55,980 --> 00:01:00,330 ‫Are they the same example without my city, let's say I don't have it on my city. 19 00:01:00,330 --> 00:01:04,290 ‫I don't enforce this in my database or over the vendor of this database. 20 00:01:04,560 --> 00:01:06,920 ‫Oracle Bosco's didn't implement that at all. 21 00:01:06,930 --> 00:01:10,530 ‫Must do, which is bad or all relational should implement that. 22 00:01:10,530 --> 00:01:11,640 ‫The Muslim blessing. 23 00:01:12,420 --> 00:01:15,120 ‫I'm going to deposit the same transaction. 24 00:01:15,120 --> 00:01:15,630 ‫I'm going to do it. 25 00:01:15,630 --> 00:01:20,940 ‫But we're going to add some will the spices on top of that again transaction. 26 00:01:21,780 --> 00:01:23,240 ‫I'm going to put hundreds of code. 27 00:01:23,250 --> 00:01:24,160 ‫OK, I need to check. 28 00:01:24,160 --> 00:01:25,330 ‫Does this guy have one hundred? 29 00:01:25,650 --> 00:01:26,580 ‫He does, sir. 30 00:01:26,820 --> 00:01:27,800 ‫OK, cool. 31 00:01:27,960 --> 00:01:30,070 ‫Go ahead and divide the gold. 32 00:01:30,420 --> 00:01:31,530 ‫Right with one hundred. 33 00:01:32,010 --> 00:01:36,240 ‫And what the heck happened. 34 00:01:36,960 --> 00:01:37,710 ‫That's not a machine. 35 00:01:37,710 --> 00:01:39,750 ‫That's just a slight good but yeah. 36 00:01:40,560 --> 00:01:43,200 ‫Your database crashed something habit. 37 00:01:45,450 --> 00:01:48,200 ‫You went back, restarted the database, guess what? 38 00:01:50,320 --> 00:01:56,560 ‫That's the last thing you did, you you debated it when I come by you, but you didn't get to the other 39 00:01:56,560 --> 00:02:01,710 ‫part of the transaction to actually comment and change that to six hundred. 40 00:02:01,960 --> 00:02:05,320 ‫So now you have a hundred dollars in the thin air. 41 00:02:05,890 --> 00:02:07,240 ‫It just went away. 42 00:02:07,660 --> 00:02:08,150 ‫Right. 43 00:02:08,260 --> 00:02:10,050 ‫That's just Budish, right? 44 00:02:10,060 --> 00:02:11,130 ‫That's very badush. 45 00:02:11,380 --> 00:02:15,380 ‫OK, after we restarted the machines, I can't get credit obviously. 46 00:02:16,000 --> 00:02:16,810 ‫So that's what I thought. 47 00:02:16,810 --> 00:02:22,840 ‫My transaction is a transaction that will roll back all queries, all changes if one of the queries 48 00:02:22,840 --> 00:02:23,110 ‫fail. 49 00:02:23,140 --> 00:02:24,580 ‫So that's what it means essentially. 50 00:02:24,580 --> 00:02:24,790 ‫Right. 51 00:02:25,030 --> 00:02:31,570 ‫So if this is what we had just there is not a atomic transaction, what happened is as bad. 52 00:02:31,900 --> 00:02:32,230 ‫Right. 53 00:02:32,260 --> 00:02:36,690 ‫So the correct way is to just roll back and roll back this two thousand. 54 00:02:37,020 --> 00:02:37,910 ‫Does that make sense, guys? 55 00:02:38,230 --> 00:02:39,610 ‫That's what I told my city is.