1 00:00:44,929 --> 00:00:47,959 W. Curtis Preston: Hi, and welcome to Backup Central's Restore All podcast. 2 00:00:47,959 --> 00:00:50,479 I'm a host w Curtis Preston, a k a, Mr. 3 00:00:50,479 --> 00:00:55,739 Backup, and I have with me my Monday morning melancholy 4 00:00:55,744 --> 00:01:00,259 minimizer Prasanna Malaiyandi? 5 00:01:02,274 --> 00:01:02,694 Prasanna Malaiyandi: Wow. 6 00:01:03,034 --> 00:01:03,874 How's it going? 7 00:01:03,874 --> 00:01:08,584 So we won't get into your melancholy, but here, here's some good news for you. 8 00:01:08,584 --> 00:01:11,014 You know what this, you know what today is. 9 00:01:11,434 --> 00:01:13,084 There's two important things that happened today. 10 00:01:14,179 --> 00:01:16,099 W. Curtis Preston: It's, no, I got nothing. 11 00:01:19,144 --> 00:01:21,844 Prasanna Malaiyandi: So the first one is I now 12 00:01:21,889 --> 00:01:22,339 W. Curtis Preston: Oh, do you? 13 00:01:22,444 --> 00:01:22,774 Prasanna Malaiyandi: year. 14 00:01:24,499 --> 00:01:26,869 W. Curtis Preston: You know the day you're three actually. 15 00:01:26,884 --> 00:01:28,384 Prasanna Malaiyandi: It was actually a couple of weeks ago. 16 00:01:28,504 --> 00:01:31,294 It was, it's actually two weeks ago. 17 00:01:32,584 --> 00:01:32,974 Right. 18 00:01:33,064 --> 00:01:38,134 But I do now have a three-year-old beard and three-year-old hair. 19 00:01:38,134 --> 00:01:39,544 I don't know what you call three-year-old 20 00:01:39,709 --> 00:01:40,339 W. Curtis Preston: what I call three. 21 00:01:42,424 --> 00:01:42,724 Prasanna Malaiyandi: Yeah. 22 00:01:43,159 --> 00:01:44,329 W. Curtis Preston: In need of a haircut. 23 00:01:44,389 --> 00:01:46,249 That's what I, that's what I call that. 24 00:01:47,344 --> 00:01:48,904 Prasanna Malaiyandi: No, it's fine. 25 00:01:49,594 --> 00:01:50,014 And. 26 00:01:50,794 --> 00:01:54,814 The second one is, this is our 200th 27 00:01:54,859 --> 00:01:57,499 W. Curtis Preston: Are we really recording our 200th episode? 28 00:01:58,879 --> 00:01:59,119 Wow. 29 00:02:00,354 --> 00:02:04,644 That's almost four years of podcasts. 30 00:02:06,084 --> 00:02:07,164 That's a lot of talking. 31 00:02:08,409 --> 00:02:10,569 Prasanna Malaiyandi: And thank you to the listeners for listening 32 00:02:10,574 --> 00:02:12,649 to us for these last like four 33 00:02:12,789 --> 00:02:15,699 W. Curtis Preston: I'm, um, I'm on another podcast that 34 00:02:15,699 --> 00:02:17,559 doesn't have as many listeners. 35 00:02:18,009 --> 00:02:23,499 Um, and I mean, it has very, very few listeners and it's not, you 36 00:02:23,499 --> 00:02:24,639 know, it's just not the same. 37 00:02:24,639 --> 00:02:29,509 Like if you, if you're producing a podcast and no one's listening to it, it's gonna. 38 00:02:30,569 --> 00:02:32,094 You're like, why am I doing this? 39 00:02:32,544 --> 00:02:38,244 But yeah, we've got, we've got, um, you know, um, thousands of you out there that 40 00:02:38,244 --> 00:02:41,334 are listening to it and we appreciate it. 41 00:02:41,339 --> 00:02:46,014 And without that, uh, this would seem like a lot of effort for nothing. 42 00:02:46,019 --> 00:02:48,774 So, um, definitely, um, 43 00:02:49,029 --> 00:02:49,419 Prasanna Malaiyandi: Yeah. 44 00:02:49,974 --> 00:02:50,544 W. Curtis Preston: Well, that's good. 45 00:02:50,544 --> 00:02:51,084 You know what? 46 00:02:51,744 --> 00:02:52,224 See, 47 00:02:52,329 --> 00:02:53,139 Prasanna Malaiyandi: make your Monday a little 48 00:02:53,154 --> 00:02:54,984 W. Curtis Preston: brought, that, brought that, that helped me out. 49 00:02:54,984 --> 00:02:58,644 I'm having, I'm, I'm not having the greatest Monday here and see this. 50 00:02:58,644 --> 00:03:01,584 What, this, why, you know, you're my Monday morning melancholy 51 00:03:01,584 --> 00:03:07,374 minimizer, but, But the, but the beard, the beard and the hair thing. 52 00:03:07,884 --> 00:03:08,784 I know, man. 53 00:03:08,874 --> 00:03:12,234 I mean, it, it's funny for those of you watching on the, on the, you know, you 54 00:03:12,239 --> 00:03:16,884 can see the video of this if you go to backup central.com or you can listen to 55 00:03:16,884 --> 00:03:18,774 it on, you know, on any of the places. 56 00:03:19,254 --> 00:03:23,154 And, uh, but those of you looking, you, you see me, I just got a new 57 00:03:23,154 --> 00:03:27,024 haircut talking about this nice trim saying, I've got this nice 58 00:03:27,024 --> 00:03:29,964 trim, trim kept to my face, beard. 59 00:03:30,234 --> 00:03:31,464 And then we have Prasanna. 60 00:03:32,199 --> 00:03:35,179 Uh, that is the complete opposite. 61 00:03:37,439 --> 00:03:41,229 Prasanna Malaiyandi: Yeah, I, I, I once had a friend, hi Jane, who 62 00:03:41,609 --> 00:03:42,939 referred to me as the caveman. 63 00:03:45,654 --> 00:03:47,334 And this is what I had a normal beer too. 64 00:03:47,334 --> 00:03:48,384 Not like this. 65 00:03:49,199 --> 00:03:51,159 W. Curtis Preston: opposites in so many different ways. 66 00:03:52,889 --> 00:03:57,114 Um, you know, like when it comes to movies and, you know, when it comes to 67 00:03:57,114 --> 00:04:01,374 the things we enjoy eating, what, there's some stuff we like eating that's similar. 68 00:04:01,674 --> 00:04:04,074 Um, but, and I, and 69 00:04:05,394 --> 00:04:06,924 Prasanna Malaiyandi: And this is why we get along so well, 70 00:04:06,984 --> 00:04:08,754 W. Curtis Preston: whole opposite attract thing. 71 00:04:08,994 --> 00:04:15,834 Um, well, uh, we're gonna continue our, uh, backup to basic series, 72 00:04:15,864 --> 00:04:17,814 uh, today, talking about databases. 73 00:04:18,084 --> 00:04:20,664 Before I do that, I'll throw out our usual disclaimer. 74 00:04:21,519 --> 00:04:23,829 I and Prasanna work at different companies. 75 00:04:23,829 --> 00:04:25,719 He works for Zoom, I work for Druva. 76 00:04:26,079 --> 00:04:28,899 This is not a podcast of either company. 77 00:04:29,259 --> 00:04:31,479 Uh, the opinions that you hear ours. 78 00:04:31,899 --> 00:04:35,439 If you'd like to join the conversation, just, uh, reach out to me, w Curtis 79 00:04:35,439 --> 00:04:43,089 Preston gmail, or at WC preston on Twitter and also linkedin.com/iin/mr. 80 00:04:43,089 --> 00:04:43,599 Backup. 81 00:04:43,659 --> 00:04:45,009 You'll find me there as well. 82 00:04:46,149 --> 00:04:50,109 And, uh, you know, um, join the conversation, right? 83 00:04:50,109 --> 00:04:51,249 We'd love to have you on. 84 00:04:51,279 --> 00:04:55,149 And also please rate us, uh, go to your favorite podcast or scroll down 85 00:04:55,154 --> 00:04:59,469 to the, to the comments and um, you know, give us some stars and some 86 00:04:59,469 --> 00:05:01,539 comments we love that keeps us going. 87 00:05:02,139 --> 00:05:04,569 Uh, except for that one guy or the, gave us one star. 88 00:05:04,569 --> 00:05:08,439 I don't know what his deal was, but, um, it's one person. 89 00:05:08,709 --> 00:05:10,299 It's one person that gave us one star. 90 00:05:10,304 --> 00:05:11,259 And he doesn't say why. 91 00:05:11,259 --> 00:05:13,659 I'm like, Hmm, that was harsh. 92 00:05:14,349 --> 00:05:16,629 Um, Who that is. 93 00:05:17,469 --> 00:05:17,979 Yeah, 94 00:05:18,099 --> 00:05:18,939 Prasanna Malaiyandi: tell us so we can 95 00:05:19,029 --> 00:05:21,219 W. Curtis Preston: I think, you know, if you want to say, listen, I would 96 00:05:21,219 --> 00:05:25,149 really like to listen to that podcast, but Prasanna needs to cut his hair. 97 00:05:28,824 --> 00:05:28,944 All 98 00:05:28,959 --> 00:05:29,739 Prasanna Malaiyandi: Not gonna happen. 99 00:05:29,739 --> 00:05:30,409 I'm sorry 100 00:05:30,474 --> 00:05:31,764 W. Curtis Preston: know, it is what it is. 101 00:05:32,124 --> 00:05:36,804 Well, we are continuing our, um, our backup to basic series, which 102 00:05:36,804 --> 00:05:40,854 is based on this, uh, latest book that I wrote, which of course I 103 00:05:40,859 --> 00:05:42,684 had lots of help from Prasanna on. 104 00:05:43,164 --> 00:05:49,734 Um, and it's, uh, modern Data Protection from O'Reilly and Associates, and, you 105 00:05:49,734 --> 00:05:51,834 know, you can find it at, uh, wherever. 106 00:05:52,189 --> 00:05:55,849 Wherever books are sold, um, you can get both, uh, an ebook 107 00:05:55,849 --> 00:05:57,349 version and a printed version. 108 00:05:57,829 --> 00:06:04,969 And, um, So let's talk about, uh, th this is about protecting databases. 109 00:06:04,974 --> 00:06:10,719 So I, I know I've told this story on the podcast, but it was a broken database 110 00:06:10,719 --> 00:06:13,329 that basically started my career, right? 111 00:06:13,479 --> 00:06:15,519 Um, that, yeah. 112 00:06:16,449 --> 00:06:20,289 Um, it was the, the name of the database was Paris. 113 00:06:20,319 --> 00:06:25,599 It was my, uh, my bank's purchasing database. 114 00:06:26,049 --> 00:06:28,209 And, uh, we were backing it. 115 00:06:29,244 --> 00:06:33,534 Via what I would now refer to as the hot backup method where you put the 116 00:06:33,534 --> 00:06:36,984 da, you put the data files into backup mode, and then you back them up. 117 00:06:37,194 --> 00:06:43,944 Except that we had moved, um, we had moved the server over to another, we 118 00:06:43,944 --> 00:06:47,184 had moved the database over to another server, and nobody had told me that, 119 00:06:47,274 --> 00:06:50,904 that I needed to put the script in place so that I could do the backups. 120 00:06:51,324 --> 00:06:54,474 And we had been backing it up for months without, you know, 121 00:06:54,684 --> 00:06:56,004 without getting a decent backup. 122 00:06:56,477 --> 00:06:57,557 it was inconsistent. 123 00:06:57,647 --> 00:07:02,657 And, um, I remember sitting there and the, the boss was like, so 124 00:07:02,657 --> 00:07:04,097 let me, let me get this straight. 125 00:07:04,097 --> 00:07:06,227 We have absolutely no backups of Paris whatsoever. 126 00:07:06,227 --> 00:07:07,697 And I'm like, that is what I'm saying. 127 00:07:08,357 --> 00:07:13,517 Uh, and she didn't fire me tr you know, chalked it up to bad training. 128 00:07:14,117 --> 00:07:19,157 Uh, Ron Rodriguez, all your fault to this day, I'm gonna 129 00:07:19,157 --> 00:07:20,477 throw you under the bus for that. 130 00:07:22,052 --> 00:07:24,682 Prasanna Malaiyandi: You're like, you're like a name That sticks in my head. 131 00:07:25,892 --> 00:07:26,582 W. Curtis Preston: good guy. 132 00:07:26,582 --> 00:07:28,772 But yeah, just he left that out of the training. 133 00:07:29,222 --> 00:07:32,312 So, uh, so I think it's important for you to understand databases 134 00:07:32,312 --> 00:07:37,142 because they are, you know, I think for, for many environments they're 135 00:07:37,142 --> 00:07:38,912 more than 50% of the data center. 136 00:07:38,917 --> 00:07:40,292 Isn't that, isn't that normal? 137 00:07:40,292 --> 00:07:42,752 Like for structured data essentially to be, 138 00:07:46,227 --> 00:07:47,957 Prasanna Malaiyandi: I think that's changing these days. 139 00:07:49,157 --> 00:07:49,757 Oh, sorry. 140 00:07:49,907 --> 00:07:52,997 For structured data for most of it to be stored in databases. 141 00:07:53,002 --> 00:07:53,687 I think that would be a 142 00:07:53,897 --> 00:07:56,027 W. Curtis Preston: So you're not necessarily agreeing that 143 00:07:56,027 --> 00:07:58,997 most of the data in the, in the data center is structured data. 144 00:07:58,997 --> 00:08:06,647 You're thinking that nowadays unstructured data is more because we're just, yeah. 145 00:08:06,797 --> 00:08:07,217 Okay. 146 00:08:08,117 --> 00:08:09,047 Yeah, yeah. 147 00:08:09,047 --> 00:08:09,227 We 148 00:08:09,227 --> 00:08:09,737 Prasanna Malaiyandi: data. 149 00:08:10,037 --> 00:08:10,307 Yeah. 150 00:08:11,047 --> 00:08:15,227 And, and if, and when you, but if you do caveat it with saying in the 151 00:08:15,227 --> 00:08:16,937 data center, I think that statement 152 00:08:17,087 --> 00:08:18,017 W. Curtis Preston: You know what's funny? 153 00:08:18,017 --> 00:08:21,107 The phrases like that come out of this old mouth, and I don't 154 00:08:21,107 --> 00:08:22,367 even mean it when I say it. 155 00:08:23,067 --> 00:08:23,557 Prasanna Malaiyandi: Yeah. 156 00:08:23,597 --> 00:08:26,267 W. Curtis Preston: I don't, I mean, in the computing environment. 157 00:08:26,837 --> 00:08:30,767 Um, so you, you're thinking that there's a lot of stuff up there. 158 00:08:31,007 --> 00:08:32,467 Prasanna Malaiyandi: Just because of the amount, large amount. 159 00:08:33,482 --> 00:08:33,812 Oh yeah. 160 00:08:33,842 --> 00:08:36,572 Just the large amount of data that's out there in the world. 161 00:08:36,572 --> 00:08:36,932 Right. 162 00:08:36,932 --> 00:08:38,012 And unstructured 163 00:08:38,147 --> 00:08:40,757 W. Curtis Preston: There was a time when structured data, data 164 00:08:40,847 --> 00:08:44,447 and databases specifically was the king of the data center. 165 00:08:44,927 --> 00:08:45,377 Right. 166 00:08:45,437 --> 00:08:51,347 Um, and then, um, then we just started storing on just all kinds of nonsense. 167 00:08:52,067 --> 00:08:57,767 Um, we just, we as a, as a human race, we have seemed to have a 168 00:08:57,772 --> 00:09:01,207 never ending desire to store stuff. 169 00:09:03,812 --> 00:09:04,382 Prasanna Malaiyandi: Pack rats. 170 00:09:04,682 --> 00:09:05,492 Pack rats. 171 00:09:05,492 --> 00:09:06,162 That's what we 172 00:09:06,317 --> 00:09:11,387 W. Curtis Preston: Um, so I, so the, you know, if, if you don't know anything 173 00:09:11,392 --> 00:09:15,527 about databases, the, you know, you should learn a lot in this episode. 174 00:09:15,527 --> 00:09:19,397 If you know a a lot about databases, you may know more than I do. 175 00:09:19,397 --> 00:09:23,177 I am not a dba, uh, I have never been a dba. 176 00:09:23,387 --> 00:09:29,197 Uh, I have often been at war with DBAs, um, but. 177 00:09:30,812 --> 00:09:33,512 Prasanna Malaiyandi: That is a database admin who, yeah, from a 178 00:09:33,512 --> 00:09:35,402 backup admin perspective, probably 179 00:09:35,537 --> 00:09:38,567 W. Curtis Preston: uh, I, I've run into a few fights, you know, I've had 180 00:09:38,567 --> 00:09:44,417 a few fights, but, um, so I think it's important to sort of divvy up the, 181 00:09:44,717 --> 00:09:47,777 you know, the computing world into these different buckets so that we 182 00:09:47,777 --> 00:09:49,037 understand what we're talking about. 183 00:09:49,397 --> 00:09:52,297 And the first thing that I talked about was database delivery model. 184 00:09:53,027 --> 00:09:56,937 And the first is, uh, is traditional database software. 185 00:09:56,942 --> 00:09:59,397 What would you think I would mean by that Prasanna? 186 00:09:59,417 --> 00:10:00,557 And maybe give an example. 187 00:10:02,897 --> 00:10:06,288 Prasanna Malaiyandi: Yeah, so the biggest is you basically take the software, you 188 00:10:06,293 --> 00:10:09,197 download it from the vendor, you deploy it on your servers, you're managing 189 00:10:09,197 --> 00:10:10,847 it, you're doing everything else. 190 00:10:11,177 --> 00:10:15,317 This traditionally has always been like Microsoft sql. 191 00:10:15,317 --> 00:10:17,957 You have your Oracle databases. 192 00:10:17,987 --> 00:10:19,927 I think those are probably the two biggest, 193 00:10:20,687 --> 00:10:22,257 W. Curtis Preston: Still, still Cybase. 194 00:10:22,257 --> 00:10:24,527 Informix is out there and, well, and of course, yeah. 195 00:10:24,797 --> 00:10:25,217 Yeah. 196 00:10:25,217 --> 00:10:25,667 I don't know. 197 00:10:25,667 --> 00:10:28,427 MySQL might actually be the biggest database out there. 198 00:10:29,327 --> 00:10:33,932 Um, in terms of just certainly number of deployments, but many, many, you know, but 199 00:10:33,932 --> 00:10:38,102 I wonder if we added up all the gigabytes of all the little tiny MySQL databases. 200 00:10:38,672 --> 00:10:43,022 Um, I mean, the Backup Central has a bunch of MySQL databases behind it. 201 00:10:43,622 --> 00:10:47,252 Uh, but yeah, that's basically, you know, that's normally what I think 202 00:10:47,252 --> 00:10:50,312 many people think of when they think. 203 00:10:51,732 --> 00:10:52,262 Databases, right? 204 00:10:52,652 --> 00:10:58,372 But then if we take that database and someone else runs the database 205 00:10:58,377 --> 00:11:01,022 application itself, right? 206 00:11:01,142 --> 00:11:04,292 And then all I have to deal with, so basically they're gonna manage the 207 00:11:04,297 --> 00:11:11,282 storage, the patching of, you know, Oracle, MySQL, uh, the security, perhaps 208 00:11:11,282 --> 00:11:13,022 the security administration of it. 209 00:11:13,502 --> 00:11:19,742 And then all I have to do is add database, add table, um, then that. 210 00:11:20,047 --> 00:11:20,657 Prasanna Malaiyandi: Mm-hmm. 211 00:11:20,762 --> 00:11:22,712 W. Curtis Preston: Exactly, and then start using the database. 212 00:11:22,712 --> 00:11:26,522 That would be what we call a PaaS database or platform as a service. 213 00:11:26,522 --> 00:11:30,062 You get the database platform, and the best example I have 214 00:11:30,062 --> 00:11:33,152 of that is aws, r d s, right? 215 00:11:33,157 --> 00:11:34,712 Relational database service. 216 00:11:35,582 --> 00:11:39,902 From a backup perspective, the main difference between these two is that 217 00:11:40,212 --> 00:11:44,612 you don't, you, you can't necessarily install, like if you want to back up, 218 00:11:44,762 --> 00:11:51,947 um, Let's say, uh, SQL Server, you can install a SQL Server backup, uh, 219 00:11:52,357 --> 00:11:55,997 uh, a agent right it on it, right. 220 00:11:55,997 --> 00:11:57,377 You, you don't 221 00:11:57,377 --> 00:11:57,887 observe it, 222 00:11:57,937 --> 00:12:00,247 Prasanna Malaiyandi: And just quickly on that, I don't know if we'll talk about 223 00:12:00,247 --> 00:12:04,417 this later, but, and, but I think that's where a lot of these vendors who are 224 00:12:04,417 --> 00:12:10,267 providing PAs databases sort of try to bake in backup and some of these recovery 225 00:12:10,267 --> 00:12:12,397 operations into the platform itself 226 00:12:15,007 --> 00:12:19,117 W. Curtis Preston: yeah, they, they do, they do tend to build in backup features. 227 00:12:19,417 --> 00:12:22,327 You often need to actually execute those features. 228 00:12:22,327 --> 00:12:26,572 You need to actually, uh, Drive the backup, but they give you the tools, they 229 00:12:26,572 --> 00:12:28,162 give you the car, you gotta drive it. 230 00:12:28,582 --> 00:12:31,882 Um, there is one interesting one, and I'll pick up on Amazon. 231 00:12:31,887 --> 00:12:33,502 I'll pick on Amazon here for a minute. 232 00:12:34,222 --> 00:12:41,742 Amazon, r d s does support, um, uh, RMAN for Oracle. 233 00:12:42,652 --> 00:12:43,762 Let me, let me rephrase. 234 00:12:44,032 --> 00:12:47,392 They support Armand backups for Oracle. 235 00:12:47,692 --> 00:12:48,022 You know what? 236 00:12:48,022 --> 00:12:48,892 They don't support. 237 00:12:51,177 --> 00:12:51,547 Prasanna Malaiyandi: S B T 238 00:12:51,952 --> 00:12:55,112 W. Curtis Preston: No, they don't support rman restores for Oracle. 239 00:12:55,117 --> 00:12:55,657 Prasanna Malaiyandi: oh oh. 240 00:12:55,797 --> 00:12:56,117 That's. 241 00:12:56,902 --> 00:12:56,962 W. Curtis Preston: You 242 00:12:56,962 --> 00:13:01,132 can make, you can make Rman backups with Oracle, with Amazon rds. 243 00:13:01,132 --> 00:13:04,462 But the last time I checked you cannot do am you cannot do, uh, 244 00:13:04,492 --> 00:13:06,982 rman restores, which is just odd. 245 00:13:07,402 --> 00:13:08,092 Uh, it is 246 00:13:08,152 --> 00:13:09,982 Prasanna Malaiyandi: but I think that's where they hope that you're 247 00:13:09,982 --> 00:13:13,402 using like their built-in snapshot and capabilities and everything else like 248 00:13:13,407 --> 00:13:15,712 that to if you need to actually restore. 249 00:13:15,717 --> 00:13:17,902 Otherwise it's like, hey, you have an Armand backup and you 250 00:13:17,902 --> 00:13:19,852 could take it offsite or to your 251 00:13:19,852 --> 00:13:22,252 own instance, if you will, to do your restores. 252 00:13:22,567 --> 00:13:23,797 W. Curtis Preston: I guess it's more, yeah. 253 00:13:23,857 --> 00:13:24,277 Yeah. 254 00:13:24,637 --> 00:13:26,287 Um, just a weird one. 255 00:13:26,497 --> 00:13:29,847 So then the next one we have here is serverless databases. 256 00:13:29,852 --> 00:13:31,327 You want to tackle, tackle that one? 257 00:13:32,122 --> 00:13:34,957 Prasanna Malaiyandi: Yeah, so we just talked about, okay, you have. 258 00:13:35,872 --> 00:13:38,183 Sort of someone else managing the server, but you're still 259 00:13:38,188 --> 00:13:39,712 managing all the databases. 260 00:13:39,982 --> 00:13:43,162 You also typically are involved in sort of performance tuning 261 00:13:43,162 --> 00:13:45,142 at that point as well, right? 262 00:13:45,142 --> 00:13:47,632 With serverless, you're sort of getting away from all of that. 263 00:13:47,632 --> 00:13:49,732 It's like, Hey, here's a database endpoint. 264 00:13:50,092 --> 00:13:53,992 You don't even do sort of the normal, basic operations other than sort of 265 00:13:54,232 --> 00:13:58,462 accessing the data, and it automatically sort of scales up, scales down on its own. 266 00:13:58,822 --> 00:13:59,872 You don't have to worry about it. 267 00:13:59,902 --> 00:14:03,172 Now, it's funny that everyone talks about serverless, even like serverless. 268 00:14:03,717 --> 00:14:04,137 In the end, 269 00:14:04,137 --> 00:14:05,777 there's still a server somewhere, right? 270 00:14:05,857 --> 00:14:06,337 W. Curtis Preston: Right. 271 00:14:06,337 --> 00:14:07,027 But you are not 272 00:14:07,027 --> 00:14:08,317 managing it right. 273 00:14:09,212 --> 00:14:09,517 Yeah. 274 00:14:09,937 --> 00:14:15,847 Um, and the, the biggest example here I would have would be DynamoDB. 275 00:14:15,877 --> 00:14:19,837 I mean, there are a bunch of serverless databases, both on Amazon and 276 00:14:19,842 --> 00:14:23,287 other, other, uh, cloud providers. 277 00:14:23,737 --> 00:14:27,097 But the idea with, with Amazon db, I think, I think it, it, 278 00:14:27,097 --> 00:14:30,757 it's a perfect example of how, how you can make it very simple. 279 00:14:31,117 --> 00:14:33,834 With Dynamo DB , you just give it a key in value. 280 00:14:34,699 --> 00:14:34,824 Right. 281 00:14:34,829 --> 00:14:38,214 You have an account, you have a authentication, you give it a key and 282 00:14:38,214 --> 00:14:40,314 value pair and it will store it somewhere. 283 00:14:40,554 --> 00:14:43,194 You're not creating that table, you're not creating a database, 284 00:14:43,194 --> 00:14:44,484 you're not creating any of that stuff. 285 00:14:44,724 --> 00:14:46,974 You're just say, Hey, here's a key and a value. 286 00:14:47,274 --> 00:14:49,194 Uh, store it for me and I'll ask for it later. 287 00:14:49,764 --> 00:14:52,974 So that's what I'm calling the database delivery models. 288 00:14:53,674 --> 00:14:56,639 And then we've got the database models, which are, which are like 289 00:14:56,639 --> 00:15:00,839 the different, that's how you would, that's how you might get a database. 290 00:15:00,844 --> 00:15:04,319 This is what kind of database you might get. 291 00:15:04,739 --> 00:15:10,049 Um, and the biggest category, what would the biggest category be? 292 00:15:10,709 --> 00:15:11,369 What do you think? 293 00:15:12,749 --> 00:15:13,169 And by the 294 00:15:13,289 --> 00:15:13,979 Prasanna Malaiyandi: Well, it depends. 295 00:15:13,979 --> 00:15:14,069 It 296 00:15:14,099 --> 00:15:14,429 W. Curtis Preston: not even. 297 00:15:15,179 --> 00:15:16,469 Prasanna Malaiyandi: Well, I think it depends on what 298 00:15:16,469 --> 00:15:17,849 you mean by biggest, right? 299 00:15:17,849 --> 00:15:19,439 Is it the number of deployments? 300 00:15:19,439 --> 00:15:20,939 Is it the sizes? 301 00:15:21,749 --> 00:15:22,199 Right. 302 00:15:22,799 --> 00:15:23,279 W. Curtis Preston: I don't know. 303 00:15:23,279 --> 00:15:27,689 I'm just talking about the, the db engines.com, the most 304 00:15:27,689 --> 00:15:28,619 popular 305 00:15:29,429 --> 00:15:30,629 Prasanna Malaiyandi: relational databases. 306 00:15:31,139 --> 00:15:31,739 W. Curtis Preston: databases. 307 00:15:31,739 --> 00:15:32,009 Yeah. 308 00:15:32,039 --> 00:15:35,909 It looks to be over 75% of, of the other ones. 309 00:15:36,239 --> 00:15:37,469 There are other types. 310 00:15:37,469 --> 00:15:41,039 One of them is the one I just mentioned, the key value pair database. 311 00:15:41,039 --> 00:15:41,399 Right. 312 00:15:41,969 --> 00:15:45,839 There's time series, there's graph databases, document databases, a 313 00:15:46,189 --> 00:15:47,909 database just for search engines, right? 314 00:15:48,389 --> 00:15:51,209 Th these are the different types of databases and they tend 315 00:15:51,209 --> 00:15:55,319 to behave differently from a backup and recovery perspective. 316 00:15:55,319 --> 00:16:01,589 And I do think it's important for you to understand, um, you know, the 317 00:16:01,589 --> 00:16:04,859 type of database that you're backing up when you're backing it up, right? 318 00:16:05,009 --> 00:16:05,429 That's 319 00:16:05,474 --> 00:16:07,994 Prasanna Malaiyandi: Because they each have their own nuances and differences. 320 00:16:07,994 --> 00:16:10,784 It's not like a database is a database because from backup 321 00:16:10,784 --> 00:16:12,314 and restores, they're completely 322 00:16:12,314 --> 00:16:12,674 different. 323 00:16:13,124 --> 00:16:13,844 W. Curtis Preston: Exactly. 324 00:16:14,594 --> 00:16:20,234 And then this is where I think we really get into, you really need to understand 325 00:16:20,234 --> 00:16:23,564 this when you're doing a backup and recovery, and that is the different 326 00:16:23,564 --> 00:16:25,574 consistency models of a database. 327 00:16:26,384 --> 00:16:28,034 Prasanna Malaiyandi: What do you mean by consistency models? 328 00:16:28,079 --> 00:16:29,699 W. Curtis Preston: So immediate. 329 00:16:30,909 --> 00:16:33,284 Right versus eventual versus hybrid. 330 00:16:33,614 --> 00:16:36,224 These are the, the, the different consistency models, right? 331 00:16:36,464 --> 00:16:42,359 Immediate is the one that most of us think of when we, um, When we take a 332 00:16:42,359 --> 00:16:44,909 databases, at least, I'm, I'm gonna say it's probably the most popular, 333 00:16:44,909 --> 00:16:49,589 again, relational database management systems, RDBMSs, those are, I'm 334 00:16:49,829 --> 00:16:51,539 pretty sure those are all immediate. 335 00:16:51,599 --> 00:16:52,799 Wouldn't they be all immediate? 336 00:16:53,159 --> 00:16:53,759 Prasanna Malaiyandi: I think so. 337 00:16:53,819 --> 00:16:54,089 yeah, 338 00:16:54,359 --> 00:16:54,689 W. Curtis Preston: yeah. 339 00:16:54,929 --> 00:16:57,689 But then eventual is the one that I struggle with. 340 00:16:58,289 --> 00:17:00,199 It's like, why would you want that? 341 00:17:00,499 --> 00:17:00,919 But, 342 00:17:00,959 --> 00:17:01,259 Prasanna Malaiyandi: yeah. 343 00:17:01,499 --> 00:17:01,949 Well, I 344 00:17:01,979 --> 00:17:03,299 W. Curtis Preston: sense once you realize how they're 345 00:17:03,299 --> 00:17:04,199 typically deployed. 346 00:17:04,499 --> 00:17:04,919 Prasanna Malaiyandi: Yeah. 347 00:17:05,009 --> 00:17:07,469 Well, and here's a good example, right? 348 00:17:07,469 --> 00:17:11,999 So you have a bank, you go make a deposit with immediate, it's like, Hey, 349 00:17:12,004 --> 00:17:13,469 the transaction shows up immediately. 350 00:17:13,469 --> 00:17:15,059 You can use it, right? 351 00:17:15,064 --> 00:17:17,459 With like eventual, it's like, Hey, you made a deposit. 352 00:17:18,039 --> 00:17:22,799 Sometime in the next 24 hours or so, your bank balance will, or 353 00:17:22,829 --> 00:17:24,479 your bank account will balance out. 354 00:17:24,479 --> 00:17:27,959 But until then, you may be able to withdraw funds. 355 00:17:27,959 --> 00:17:30,869 Sometimes you may not be able to if it hasn't cleared, right? 356 00:17:30,869 --> 00:17:31,049 So, 357 00:17:31,379 --> 00:17:31,889 W. Curtis Preston: Yeah. 358 00:17:32,224 --> 00:17:33,749 Prasanna Malaiyandi: That's kind of how I like to think about it. 359 00:17:34,109 --> 00:17:39,089 W. Curtis Preston: The example that I used in, um, the book was I used 360 00:17:39,089 --> 00:17:45,629 DNS as an example of the concept of eventual consistency, where, um, 361 00:17:45,749 --> 00:17:49,709 you're gonna get a different answer depending on who you ask and when, 362 00:17:50,669 --> 00:17:51,029 Prasanna Malaiyandi: Yep. 363 00:17:51,149 --> 00:17:51,659 W. Curtis Preston: right? 364 00:17:51,989 --> 00:17:57,239 You, you create a, a DNS entry and it takes a while for that entry 365 00:17:57,439 --> 00:17:57,789 Prasanna Malaiyandi: to. 366 00:17:57,794 --> 00:17:58,139 Propagate 367 00:17:58,439 --> 00:18:01,169 W. Curtis Preston: Propagate throughout the system. 368 00:18:01,529 --> 00:18:05,819 Uh, and the same is true of, of, of an eventually consistent database. 369 00:18:06,479 --> 00:18:10,229 And the thing is, you can't use the eventually consistent model. 370 00:18:10,289 --> 00:18:17,699 If getting a wrong answer will will break the, I was gonna say, yeah, we'll break 371 00:18:17,699 --> 00:18:18,299 everything. 372 00:18:18,869 --> 00:18:20,819 um, but. 373 00:18:22,044 --> 00:18:24,614 You know, it, it is weird though, right? 374 00:18:24,614 --> 00:18:25,604 It, it's weird. 375 00:18:25,784 --> 00:18:31,784 It's, I struggle with this idea of eventual consistency, um, and, 376 00:18:31,784 --> 00:18:36,494 um, how it would be okay for you to get essentially a wrong answer. 377 00:18:36,959 --> 00:18:38,099 Prasanna Malaiyandi: but I think it depends on the 378 00:18:38,099 --> 00:18:39,509 application, right? 379 00:18:39,509 --> 00:18:39,959 Where 380 00:18:40,209 --> 00:18:40,844 W. Curtis Preston: it absolutely 381 00:18:40,979 --> 00:18:43,829 Prasanna Malaiyandi: if it's, yeah, like if it's okay for you, 382 00:18:44,069 --> 00:18:45,329 cuz there is a trade-off, right? 383 00:18:45,329 --> 00:18:47,639 With, uh, immediate consistency. 384 00:18:47,909 --> 00:18:52,709 Typically there is some sort of latency associated with committing 385 00:18:52,709 --> 00:18:55,589 a transaction, especially if you're talking about multiple nodes, right? 386 00:18:55,589 --> 00:18:56,489 Which is typically where 387 00:18:56,489 --> 00:18:57,449 you see the eventual. 388 00:18:58,619 --> 00:18:58,799 W. Curtis Preston: Yeah. 389 00:18:59,639 --> 00:19:01,289 You look at dns, for example. 390 00:19:01,289 --> 00:19:03,599 DNS would break if 391 00:19:03,794 --> 00:19:04,004 Prasanna Malaiyandi: Could you 392 00:19:04,139 --> 00:19:05,519 W. Curtis Preston: to be, if it had to be 393 00:19:05,519 --> 00:19:08,339 immediately consistent across the entire world, right? 394 00:19:08,609 --> 00:19:09,239 That's the thing. 395 00:19:09,359 --> 00:19:11,759 Immediate consistency is very tight, right? 396 00:19:11,759 --> 00:19:13,049 You've got to have it right. 397 00:19:13,229 --> 00:19:17,669 And then I also listen hybrid, which is, um, somewhere between the two. 398 00:19:17,939 --> 00:19:20,369 So here's an example I have. 399 00:19:20,369 --> 00:19:24,569 So for example, DynamoDB users can tell DynamoDB they want a 400 00:19:25,069 --> 00:19:28,919 strongly consistent read, and it will always read from the leader. 401 00:19:29,474 --> 00:19:33,104 Um, where the right was initial, which is the leader is where the 402 00:19:33,104 --> 00:19:37,304 right was initially made, even if it is still being replicated elsewhere. 403 00:19:37,514 --> 00:19:38,414 So that's hybrid. 404 00:19:38,654 --> 00:19:41,864 It's an, it's eventually consistent database, but you could say when 405 00:19:41,864 --> 00:19:47,294 you create a key value pair in Dynamo DB upon read, always read 406 00:19:47,294 --> 00:19:49,544 from the first person, right? 407 00:19:50,114 --> 00:19:51,644 Um, yeah. 408 00:19:51,644 --> 00:19:55,754 There, there's a bunch of a MongoDB Couchbase, uh, that support that. 409 00:19:56,264 --> 00:20:03,209 Um, I had listed here of immediate are all the ones that we, the, the 410 00:20:03,209 --> 00:20:05,909 ones that everybody knows their name, Oracle Sequel, you know, 411 00:20:06,329 --> 00:20:09,899 uh, I have, uh, eventual consistency. 412 00:20:10,319 --> 00:20:12,689 Uh, I have Cassandra and Neo four J. 413 00:20:13,149 --> 00:20:16,479 And then I have, as hybrid, I have Mongo and DynamoDB. 414 00:20:16,569 --> 00:20:17,949 Those are just an example. 415 00:20:18,009 --> 00:20:23,229 Um, by the way, all that stuff comes from a great website, 416 00:20:23,709 --> 00:20:28,099 um, called uh, db-engines.com. 417 00:20:28,779 --> 00:20:30,909 Um, they list all that stuff in there. 418 00:20:31,599 --> 00:20:38,064 So, um, The next one, I have a bunch of terminologies here, and I'm not 419 00:20:38,064 --> 00:20:43,554 gonna go through a lot of them, but, um, I think one that people 420 00:20:43,554 --> 00:20:47,424 struggle with is the difference between an instance and a database. 421 00:20:49,524 --> 00:20:50,274 Um, 422 00:20:50,319 --> 00:20:51,549 Prasanna Malaiyandi: What, what is the difference 423 00:20:51,549 --> 00:20:53,139 between an instance and a database? 424 00:20:53,874 --> 00:20:58,974 W. Curtis Preston: well, an instance is essentially the way I, the way I 425 00:20:58,979 --> 00:21:06,519 would describe it is, In many cases it's the same, but an instance is a set 426 00:21:06,749 --> 00:21:08,979 of processes to talk to the database. 427 00:21:09,639 --> 00:21:14,379 And the database is, well, what we normally mean when we say database, right? 428 00:21:14,439 --> 00:21:19,899 Um, so, uh, so let me, lemme just read here, because I, I, I got this like, 429 00:21:19,899 --> 00:21:24,519 check, you know, 50 times, you know, uh, there can be multiple databases within 430 00:21:24,519 --> 00:21:28,479 an instance, and a database can also be distributed across multiple instances. 431 00:21:29,514 --> 00:21:29,739 Right. 432 00:21:29,799 --> 00:21:32,949 Um, on the same machine or on separate machines within a cluster. 433 00:21:32,949 --> 00:21:36,399 Therefore, an instance in a database are two entirely different concepts. 434 00:21:36,669 --> 00:21:41,139 Historically, an instance ran within a server, but modern database 435 00:21:41,589 --> 00:21:45,579 platforms have instances that span multiple servers and node, right? 436 00:21:46,239 --> 00:21:52,749 Um, so the instance is basically the thing that runs inside a server or a bm. 437 00:21:53,514 --> 00:21:56,804 Talks to this thing, but a database could be across multiple 438 00:21:56,809 --> 00:21:58,344 instances or multiple databases. 439 00:21:58,344 --> 00:22:01,824 That instance, um, it is 440 00:22:01,824 --> 00:22:02,424 complicated. 441 00:22:02,424 --> 00:22:03,454 See, this is why, this is why 442 00:22:03,834 --> 00:22:05,169 Prasanna Malaiyandi: but, but, here's here, here's a 443 00:22:05,244 --> 00:22:05,664 W. Curtis Preston: go ahead. 444 00:22:05,714 --> 00:22:05,859 Prasanna Malaiyandi: though. 445 00:22:06,189 --> 00:22:08,139 As a backup person, 446 00:22:08,769 --> 00:22:11,139 what do I need to worry about in that case? 447 00:22:11,559 --> 00:22:13,119 Do I worry about more of the instance or the 448 00:22:13,119 --> 00:22:13,689 database? 449 00:22:14,304 --> 00:22:16,854 W. Curtis Preston: Well, you just need to know. 450 00:22:16,914 --> 00:22:18,474 You need to know that there, yeah. 451 00:22:18,474 --> 00:22:19,224 It depends. 452 00:22:19,229 --> 00:22:22,314 You need to know that there are different things because. 453 00:22:24,184 --> 00:22:29,584 It, it's going to dictate how you communicate with the thing that 454 00:22:29,584 --> 00:22:31,864 you're trying to back up, right? 455 00:22:32,044 --> 00:22:36,904 Um, in many cases, I'm, I'm gonna throw you prob again. 456 00:22:36,909 --> 00:22:40,024 I'm gonna say in most cases they're the same, right? 457 00:22:40,054 --> 00:22:41,944 They're not the same, but they're in the same place. 458 00:22:41,944 --> 00:22:43,744 There's one instance and there's one database. 459 00:22:43,744 --> 00:22:46,504 Most of the databases that I worked with, it was one 460 00:22:46,504 --> 00:22:48,544 instance of one database, right? 461 00:22:48,634 --> 00:22:55,519 Um, The, um, but you just need to know that that's not always the case, right? 462 00:22:56,209 --> 00:22:58,639 We all know what a table is, right? 463 00:22:58,729 --> 00:23:04,999 Um, you know, I, I liken it, I liken it to a spreadsheet, uh, but it's not the same. 464 00:23:05,539 --> 00:23:10,309 The, um, and then there's this concept of a data file, which is where we stored the. 465 00:23:11,424 --> 00:23:13,639 Right where the database stores the data. 466 00:23:14,389 --> 00:23:19,279 Um, and this concept of a table space, which is what it sounds like, it's 467 00:23:19,279 --> 00:23:22,279 a space where you put tables, so you could put many tables in this database. 468 00:23:23,269 --> 00:23:24,049 Um, 469 00:23:24,694 --> 00:23:25,774 Prasanna Malaiyandi: And each database does it 470 00:23:25,779 --> 00:23:27,064 slightly differently. 471 00:23:27,529 --> 00:23:30,259 W. Curtis Preston: yeah, I'm, I'm trying to be very, very general here, 472 00:23:30,679 --> 00:23:30,979 Prasanna Malaiyandi: Yeah. 473 00:23:31,339 --> 00:23:34,639 And I think the other question, and I know we talked about this at the 474 00:23:34,639 --> 00:23:37,669 very beginning, talking about the problem you ran into with Paris, right? 475 00:23:37,669 --> 00:23:41,149 It's just because you have a database doesn't mean you could just take all the 476 00:23:41,149 --> 00:23:41,629 database 477 00:23:41,634 --> 00:23:42,769 files and copy them out 478 00:23:43,039 --> 00:23:45,919 W. Curtis Preston: No, you can't because the data, those data files 479 00:23:46,039 --> 00:23:48,739 are what you're trying to back up quite often. 480 00:23:48,739 --> 00:23:52,639 And if you're backing it up outside the world of the database, the database 481 00:23:52,639 --> 00:23:56,179 is changing those data files while you're, while you're backing it up. 482 00:23:56,179 --> 00:24:00,589 And it's, it's not gonna be consistent, you know, part, part of the, part 483 00:24:00,589 --> 00:24:01,729 of this file that you backed up. 484 00:24:01,729 --> 00:24:04,279 Part of it's gonna be for one point in time, part of the file is gonna 485 00:24:04,279 --> 00:24:05,419 be from another point in time. 486 00:24:05,509 --> 00:24:06,079 No, no. 487 00:24:06,079 --> 00:24:06,379 Good. 488 00:24:07,009 --> 00:24:10,189 And then, Again, going for a very generic term. 489 00:24:10,189 --> 00:24:13,819 Here I have this concept of a master file, and that is sort 490 00:24:13,819 --> 00:24:15,559 of the database of the database. 491 00:24:16,099 --> 00:24:19,849 Um, a perfect example is the Oracle control file, right? 492 00:24:19,909 --> 00:24:24,349 The, um, uh, again, this is most databases. 493 00:24:24,349 --> 00:24:30,169 Not every database has this, um, it, it might be a J S O N file, right? 494 00:24:30,859 --> 00:24:32,749 Um, go, what were you gonna. 495 00:24:33,949 --> 00:24:36,349 Prasanna Malaiyandi: does it ever feel like inception when you're working on 496 00:24:36,354 --> 00:24:37,819 databases where it's like a database 497 00:24:37,819 --> 00:24:39,109 within a database, you know? 498 00:24:40,054 --> 00:24:40,534 W. Curtis Preston: Yeah. 499 00:24:40,594 --> 00:24:43,684 Uh, by the way, SQL Servers master Database has this concept. 500 00:24:43,894 --> 00:24:46,354 Essentially it's the thing that's keeping track of all the 501 00:24:46,359 --> 00:24:47,404 things that we're talking about. 502 00:24:47,884 --> 00:24:49,174 What are all the data files? 503 00:24:49,174 --> 00:24:50,704 What point are they at? 504 00:24:50,734 --> 00:24:53,614 What if we have a eventually consistent, you know, what, 505 00:24:53,944 --> 00:24:56,104 what change level are we at? 506 00:24:56,124 --> 00:24:59,524 Um, it's the thing that keeps track of all the things. 507 00:25:00,429 --> 00:25:02,374 And, um, there 508 00:25:02,464 --> 00:25:06,094 Prasanna Malaiyandi: impressive that they actually used that piece of technology as 509 00:25:06,094 --> 00:25:08,254 a core foundation of like keeping track. 510 00:25:08,254 --> 00:25:08,674 It's like 511 00:25:09,124 --> 00:25:09,574 that's kind of 512 00:25:09,579 --> 00:25:09,934 neat. 513 00:25:10,894 --> 00:25:11,434 W. Curtis Preston: Yeah. 514 00:25:11,524 --> 00:25:17,464 Uh, and so there's going to be a different backup method for that. 515 00:25:17,824 --> 00:25:20,374 If that file exists, there's gonna be a different backup 516 00:25:20,374 --> 00:25:21,824 method for that file, right? 517 00:25:21,824 --> 00:25:24,674 So you're gonna back up that database. 518 00:25:25,004 --> 00:25:26,054 You're gonna, um, 519 00:25:26,879 --> 00:25:30,629 In Oracle, for example, there, there's a command backup control file, right? 520 00:25:30,629 --> 00:25:32,939 It's just a separate, uh, backup. 521 00:25:33,704 --> 00:25:34,374 Prasanna Malaiyandi: They're 522 00:25:34,439 --> 00:25:34,619 W. Curtis Preston: now 523 00:25:35,789 --> 00:25:37,259 exactly special. 524 00:25:37,619 --> 00:25:40,979 Uh, and then we have a very important concept, and that is 525 00:25:40,979 --> 00:25:42,599 the concept of a transaction. 526 00:25:43,409 --> 00:25:44,939 You wanna talk about what a transaction is. 527 00:25:46,199 --> 00:25:52,049 Prasanna Malaiyandi: Yeah, so usually when you say make a right to a database, right, 528 00:25:52,049 --> 00:25:57,529 you just issue the SQL command or whatever to do a simple thing, but that translates 529 00:25:57,534 --> 00:25:58,949 into a whole bunch of other things. 530 00:25:58,954 --> 00:26:03,239 Now, when you actually get that before it can apply to the actual 531 00:26:03,239 --> 00:26:05,969 database, and I don't know if you wanna talk about logs right now, but 532 00:26:06,389 --> 00:26:10,199 that transaction, typically when you think about a transaction, especially 533 00:26:10,199 --> 00:26:14,669 on a relational database side, it's something that has to either complete or. 534 00:26:16,124 --> 00:26:21,194 It's either the transaction completes and the entire database rolls forward 535 00:26:21,194 --> 00:26:25,154 and everything's good, or the transaction doesn't succeed and no part of the 536 00:26:25,154 --> 00:26:29,744 transaction is successful, so basically the entire thing happens or it doesn't, 537 00:26:29,744 --> 00:26:31,184 which means it's atomic, right? 538 00:26:31,184 --> 00:26:35,414 So it all happens and everything's successful, or no part of it happens. 539 00:26:35,414 --> 00:26:38,844 So you don't want the case where it's like, Hey, I am withdrawing 540 00:26:38,849 --> 00:26:42,014 money from your bank, but I don't set the balance properly, or 541 00:26:42,014 --> 00:26:43,274 other things like that, right? 542 00:26:43,664 --> 00:26:45,854 So it either all needs to succeed or none of it 543 00:26:45,854 --> 00:26:46,214 succeeds. 544 00:26:46,214 --> 00:26:47,804 Otherwise, the world goes crazy. 545 00:26:48,269 --> 00:26:48,629 W. Curtis Preston: Right. 546 00:26:48,629 --> 00:26:50,819 And that matters most when you, because there's two 547 00:26:50,819 --> 00:26:52,049 different types of transaction. 548 00:26:52,049 --> 00:26:53,369 They're simple and it's complex. 549 00:26:53,369 --> 00:26:56,399 Complex has a bunch of different parts of it. 550 00:26:56,459 --> 00:27:00,449 And, uh, that's a, a perfect example where you were saying that you, all of those 551 00:27:00,449 --> 00:27:04,229 parts have to work or, or none of them are allowed to work and you will then. 552 00:27:04,529 --> 00:27:09,119 So if, if we can't finish the entire transaction, let's say. 553 00:27:09,904 --> 00:27:11,639 Um, the database crashes. 554 00:27:12,029 --> 00:27:13,919 It's in, it's in the middle of that. 555 00:27:14,429 --> 00:27:19,229 What, what do we call when we make that transaction? 556 00:27:19,289 --> 00:27:20,159 Yes, we roll 557 00:27:20,164 --> 00:27:20,519 back the 558 00:27:20,579 --> 00:27:20,969 Prasanna Malaiyandi: You roll 559 00:27:20,969 --> 00:27:21,509 back. 560 00:27:21,569 --> 00:27:21,929 Yeah. 561 00:27:22,259 --> 00:27:25,139 Which basically, so now you have to think about it though, right now that 562 00:27:25,139 --> 00:27:28,919 you have this concept of, okay, there's a transaction, it's atomic, it either 563 00:27:28,919 --> 00:27:31,229 all succeeds or it gets rolled back. 564 00:27:31,529 --> 00:27:34,169 Now if you think from the database perspective, you need to be able to 565 00:27:34,169 --> 00:27:38,399 track all of these, because how do I know how to go back to a previous state? 566 00:27:38,399 --> 00:27:39,269 It's like I need to. 567 00:27:40,394 --> 00:27:41,264 The previous state. 568 00:27:41,269 --> 00:27:41,474 Right. 569 00:27:41,474 --> 00:27:47,594 So there's so many other things a database does as a matter of just accepting a 570 00:27:47,594 --> 00:27:48,554 single transaction. 571 00:27:49,859 --> 00:27:50,699 W. Curtis Preston: Yeah, exactly. 572 00:27:50,704 --> 00:27:54,859 And, and that's why we have the transaction log, right? 573 00:27:55,099 --> 00:27:58,989 So first, not every database has the concept of a transaction. 574 00:27:59,529 --> 00:28:00,189 I still think. 575 00:28:01,479 --> 00:28:05,289 Did every database has transactions, they just might not call it that. 576 00:28:05,889 --> 00:28:12,219 Um, cuz every database is making changes, is storing data and making changes. 577 00:28:12,309 --> 00:28:17,199 I think that generically every one of those should be called a transaction. 578 00:28:17,204 --> 00:28:20,469 And, and by the way, this was one of my biggest challenges when I, when I 579 00:28:20,679 --> 00:28:26,739 wrote my first, um, version of this, like, which is a really long time ago, 580 00:28:27,279 --> 00:28:33,954 was trying to get, um, DBAs, again, of different database products to agree 581 00:28:33,954 --> 00:28:38,244 on a generic term that would work and, 582 00:28:38,484 --> 00:28:39,144 Prasanna Malaiyandi: for everything. 583 00:28:39,154 --> 00:28:39,514 yeah, 584 00:28:39,834 --> 00:28:40,434 W. Curtis Preston: exactly. 585 00:28:40,434 --> 00:28:41,484 And transaction. 586 00:28:41,544 --> 00:28:44,784 Um, I is one of those things, right? 587 00:28:45,804 --> 00:28:51,565 Um, but the transaction log re uh, Oracle for example, calls it a 588 00:28:51,570 --> 00:28:58,284 redo log, some call it a, you know, um, so I ha I have the, um, It. 589 00:28:58,734 --> 00:28:59,364 So what I do 590 00:28:59,574 --> 00:29:00,624 Prasanna Malaiyandi: The T log in 591 00:29:00,654 --> 00:29:01,494 W. Curtis Preston: log might not 592 00:29:01,494 --> 00:29:06,984 be there, by The way, I'm, I'm showing that not in all NoQ databases. 593 00:29:07,044 --> 00:29:10,644 And by the way, um, we didn't talk about no SQL when we were 594 00:29:10,644 --> 00:29:11,994 talking about database types. 595 00:29:12,684 --> 00:29:15,564 I thought no SQL meant that they didn't use sql. 596 00:29:15,594 --> 00:29:21,744 It's, it's not, it's not only sql, it's what is, what no SQL stands for. 597 00:29:22,254 --> 00:29:24,624 Um, anyway, I just thought. 598 00:29:25,569 --> 00:29:31,479 Important, but, but the transaction log is extremely important. 599 00:29:32,229 --> 00:29:37,659 Um, the first being the one that we've already mentioned, and 600 00:29:37,659 --> 00:29:42,909 that is the database crashes in the midst of something, right? 601 00:29:43,149 --> 00:29:46,449 Either the database dies on the server or the server dies. 602 00:29:46,449 --> 00:29:47,799 Someone pulls out a plug. 603 00:29:48,639 --> 00:29:54,819 Um, and then when the database comes back up, This is the job of the 604 00:29:54,819 --> 00:29:57,999 master file, the transaction log. 605 00:29:57,999 --> 00:30:01,089 So we come up with the master file and the, and the database 606 00:30:01,094 --> 00:30:03,219 looks at all of the data files. 607 00:30:03,249 --> 00:30:07,629 And again, I know I'm using generic terms and these aren't always going 608 00:30:07,629 --> 00:30:10,809 to be applicable to every database, but essentially the database comes 609 00:30:10,809 --> 00:30:14,760 up and it's got something that looks across the database and 610 00:30:14,765 --> 00:30:16,449 says, okay, something happened. 611 00:30:17,499 --> 00:30:20,139 We need, we need to get back to a consistent. 612 00:30:21,624 --> 00:30:22,554 Prasanna Malaiyandi: Put Humpty Dumpty back 613 00:30:22,554 --> 00:30:22,944 together. 614 00:30:23,124 --> 00:30:23,604 W. Curtis Preston: Yeah. 615 00:30:23,634 --> 00:30:26,444 Right before we can let people start, we need to figure out 616 00:30:26,444 --> 00:30:27,854 if we had anything in process. 617 00:30:27,854 --> 00:30:32,144 We need to figure out if there were any transactions that we started recording. 618 00:30:33,874 --> 00:30:35,969 That we didn't finish, right? 619 00:30:36,209 --> 00:30:39,929 So the database is gonna come up and it's gonna look at each data file and 620 00:30:39,929 --> 00:30:42,059 it's gonna look at the, the control file. 621 00:30:42,059 --> 00:30:44,849 Like in the case of Oracle, look at the control file, otherwise 622 00:30:44,849 --> 00:30:45,899 known as the master file. 623 00:30:46,559 --> 00:30:51,839 And then, um, look at that transaction log and say, all right, we were 624 00:30:51,839 --> 00:30:53,519 supposed to finish this transaction. 625 00:30:53,519 --> 00:30:56,369 And then you're able to go to each data file and say, what Transac. 626 00:30:58,064 --> 00:30:58,229 What? 627 00:30:58,259 --> 00:31:00,989 Um, there's a, like, I think it's called sequence number. 628 00:31:01,049 --> 00:31:03,149 Sequence number is what I think Oracle calls it. 629 00:31:03,659 --> 00:31:05,579 Look at the sequence number and say, did we finish here? 630 00:31:05,579 --> 00:31:06,149 Did we finish here? 631 00:31:06,149 --> 00:31:07,559 Did we, oh, look at you. 632 00:31:07,829 --> 00:31:09,629 You didn't get to the sequence number. 633 00:31:10,259 --> 00:31:12,029 You know what, we're gonna have to roll everybody back. 634 00:31:13,469 --> 00:31:13,919 Right? 635 00:31:14,039 --> 00:31:17,309 That's what, that's the job of the control file is, I'm sorry, the of the 636 00:31:17,309 --> 00:31:21,149 transaction log is to roll everybody back. 637 00:31:21,719 --> 00:31:28,029 Um, So that, uh, we don't have, um, consistency problems 638 00:31:28,029 --> 00:31:28,449 Prasanna Malaiyandi: inconsistent. 639 00:31:28,799 --> 00:31:32,309 And then potentially you could also recover the database and roll back 640 00:31:32,314 --> 00:31:36,479 forward and reapply that transaction 641 00:31:36,479 --> 00:31:37,559 and not lose data. 642 00:31:38,129 --> 00:31:42,839 W. Curtis Preston: Yeah, I wasn't gonna cover that yet, but in fact, I'm sorry. 643 00:31:44,219 --> 00:31:47,399 We're gonna cover that in part two because I'm realizing that we've been talking 644 00:31:47,399 --> 00:31:51,389 about this for a while and we're, you know, we're coming up on 35 minutes and 645 00:31:51,394 --> 00:31:53,189 we've just covered sort of the basics. 646 00:31:53,189 --> 00:31:55,379 We haven't gotten to the backup and recovery. 647 00:31:56,109 --> 00:31:59,379 In the book, by the way, in the book, you occasionally see 648 00:31:59,379 --> 00:32:01,089 these, those little, where is it? 649 00:32:01,269 --> 00:32:03,609 The little scorpions, right? 650 00:32:04,059 --> 00:32:07,419 And the scorpion is meant to be like a, a warning, right? 651 00:32:07,419 --> 00:32:08,499 So here's what I have here. 652 00:32:09,369 --> 00:32:12,729 Please note that just like everything else in data protection and protections 653 00:32:12,729 --> 00:32:16,359 mentioned in this section, only protect against hardware failures. 654 00:32:16,749 --> 00:32:17,919 So when we have. 655 00:32:19,704 --> 00:32:21,894 All the things that are built into the database. 656 00:32:22,344 --> 00:32:28,224 If a DBA accidentally drops a crucial table or a bad actor, uh, 657 00:32:28,314 --> 00:32:32,514 deletes or encrypts your database, your fancy replication will only 658 00:32:32,514 --> 00:32:34,374 make it more efficient, right? 659 00:32:34,434 --> 00:32:37,374 It will immediately replicate whatever happened everywhere else. 660 00:32:37,374 --> 00:32:40,284 This is why we back up databases too. 661 00:32:41,724 --> 00:32:42,654 you about to say something? 662 00:32:44,169 --> 00:32:48,309 Prasanna Malaiyandi: I was just going to say that for the people 663 00:32:48,319 --> 00:32:51,369 listening, Databases are complicated. 664 00:32:51,789 --> 00:32:55,389 So if a lot of this sort of goes over your head, don't freak out. 665 00:32:55,389 --> 00:32:56,259 Don't worry. 666 00:32:56,679 --> 00:33:01,389 The database admins have been doing this for years and years and years, right? 667 00:33:01,959 --> 00:33:05,379 And just like you've learned sort of virtualization, which we'll 668 00:33:05,379 --> 00:33:11,109 talk about later, and physical or traditional, uh, sources as well, you 669 00:33:11,109 --> 00:33:12,729 just need to understand the mapping. 670 00:33:12,729 --> 00:33:16,569 And there are a couple different differences for databases. 671 00:33:16,779 --> 00:33:21,624 But once you understand that, It becomes a lot easier, so don't freak out. 672 00:33:21,624 --> 00:33:25,434 Don't worry if this all sounds like a different language, but 673 00:33:26,259 --> 00:33:26,589 W. Curtis Preston: Yeah. 674 00:33:26,589 --> 00:33:26,739 And. 675 00:33:26,784 --> 00:33:28,174 Prasanna Malaiyandi: just doing that mapping your head. 676 00:33:28,524 --> 00:33:33,114 W. Curtis Preston: Yeah, and I listed, um, again, going to that db engines.com, 677 00:33:33,114 --> 00:33:39,384 there are 13 types of databases and 300 different database products listed there. 678 00:33:40,044 --> 00:33:41,994 So don't feel overwhelmed. 679 00:33:42,354 --> 00:33:48,414 Um, this is not the world of, oh, is it Linux or, uh, windows or Mac, right? 680 00:33:48,474 --> 00:33:52,974 This is, well, it depends, and there are types of databases. 681 00:33:53,034 --> 00:33:53,934 I'll just be honest. 682 00:33:53,934 --> 00:33:56,424 There are types of databases that I don't get. 683 00:33:57,454 --> 00:33:58,924 Graph being one of them. 684 00:33:59,164 --> 00:34:03,484 I just don't understand what or how they do. 685 00:34:03,534 --> 00:34:04,144 I, I think you 686 00:34:04,329 --> 00:34:05,859 Prasanna Malaiyandi: I I heard I heard a new one. 687 00:34:06,489 --> 00:34:09,819 Yeah, I heard a new one recently, which was, uh, vector databases, 688 00:34:09,819 --> 00:34:14,109 which is pro apparently starting to be used for like AI ml. 689 00:34:15,784 --> 00:34:16,984 W. Curtis Preston: Oh, of course. 690 00:34:16,984 --> 00:34:18,424 The world of A I M L. 691 00:34:19,054 --> 00:34:23,554 Um, the, the thing that, the thing that you need to understand. 692 00:34:24,564 --> 00:34:30,384 Uh, about any database is that it has really important data 693 00:34:30,384 --> 00:34:31,524 that needs to be protected, 694 00:34:32,634 --> 00:34:33,054 Prasanna Malaiyandi: Yep. 695 00:34:33,984 --> 00:34:38,904 W. Curtis Preston: What you need to know about that database is, is. 696 00:34:40,239 --> 00:34:44,529 From a backup and recovery perspective is you need to understand all 697 00:34:44,529 --> 00:34:46,929 of the elements of that aspect. 698 00:34:47,499 --> 00:34:53,919 Um, the one thing I think you will struggle with, with some databases and 699 00:34:53,919 --> 00:35:01,239 some DBAs today is the same thing that we struggle with in other parts of of it, and 700 00:35:01,239 --> 00:35:14,964 that is, Um, some DBAs of some products, confusing availability and um, you 701 00:35:14,964 --> 00:35:18,144 know, that concept with data protection. 702 00:35:19,289 --> 00:35:24,684 Um, and I think of like Cassandra MongoDB where they're like, oh, we're good. 703 00:35:24,684 --> 00:35:26,244 Like we, you know, it's replicated. 704 00:35:26,244 --> 00:35:30,714 We got everything three different places and, um, you know, 705 00:35:30,984 --> 00:35:32,784 it's eventually consistent. 706 00:35:33,144 --> 00:35:37,224 Um, and, um, we c we can lose a node. 707 00:35:37,224 --> 00:35:37,704 We're good. 708 00:35:37,704 --> 00:35:39,714 We can lose seven nodes. 709 00:35:39,924 --> 00:35:40,645 The database will. 710 00:35:42,219 --> 00:35:42,849 Okay. 711 00:35:42,909 --> 00:35:46,479 What if we lose all the notes, right? 712 00:35:46,644 --> 00:35:47,004 Prasanna Malaiyandi: Or what if 713 00:35:47,004 --> 00:35:48,054 someone drops a table 714 00:35:48,249 --> 00:35:49,329 W. Curtis Preston: what if somebody drops a 715 00:35:49,329 --> 00:35:50,349 table, right? 716 00:35:50,409 --> 00:35:55,869 What if, uh, what if a, you know, a ransomware, uh, a threat actor 717 00:35:55,869 --> 00:35:58,839 comes in and does bad things? 718 00:35:59,659 --> 00:36:03,879 I, I don't, this is just like the same argument that I make in the SaaS 719 00:36:03,879 --> 00:36:11,784 world is, um, Like everything needs something that is like backup, right? 720 00:36:11,784 --> 00:36:17,634 I, I have the broadest term, the broadest definition of backup that I think 721 00:36:17,634 --> 00:36:24,804 anybody in the industry has, and that is anything that copies the data to another 722 00:36:24,809 --> 00:36:28,104 place for the purposes of restore, 723 00:36:29,044 --> 00:36:29,464 Prasanna Malaiyandi: Yep. 724 00:36:29,529 --> 00:36:32,124 W. Curtis Preston: that's, you know, snapshots in a replication to. 725 00:36:33,174 --> 00:36:36,684 Um, as long as we have the ability to go back in time, and as long as I 726 00:36:36,684 --> 00:36:41,814 don't have the ability to, to attack the backup with the primary, that's my 727 00:36:41,814 --> 00:36:45,414 biggest concern that I often have with snapshot and replication based methods. 728 00:36:45,504 --> 00:36:45,834 Right. 729 00:36:46,584 --> 00:36:51,774 Um, so hopefully if you're using snapshot and replication, hopefully on the other 730 00:36:51,774 --> 00:36:55,044 end your copying that data somehow. 731 00:36:55,684 --> 00:36:56,104 Prasanna Malaiyandi: Yep. 732 00:36:57,099 --> 00:37:01,749 W. Curtis Preston: Um, if, if that's a, um, you know, a C D 733 00:37:01,749 --> 00:37:05,679 P style backup, if that's tape, if that's disk, if that's cloud. 734 00:37:06,609 --> 00:37:09,579 But just don't tell me this thing doesn't need backup, 735 00:37:10,299 --> 00:37:12,309 that just doesn't roll with me. 736 00:37:12,819 --> 00:37:13,329 Right. 737 00:37:13,419 --> 00:37:14,229 Um, 738 00:37:14,449 --> 00:37:15,009 Prasanna Malaiyandi: Right. 739 00:37:15,339 --> 00:37:16,809 Can I, can I challenge 740 00:37:16,899 --> 00:37:18,249 W. Curtis Preston: resilient, you know, go ahead. 741 00:37:20,049 --> 00:37:20,379 Prasanna Malaiyandi: Sure. 742 00:37:20,384 --> 00:37:23,409 I, and maybe we'll talk about this when we get to a chapter. 743 00:37:23,409 --> 00:37:24,909 I think we have a chapter on cloud, right? 744 00:37:25,884 --> 00:37:26,334 W. Curtis Preston: Oh yeah, I'm 745 00:37:26,499 --> 00:37:29,949 Prasanna Malaiyandi: when we get there, um, one of my biggest questions is, what 746 00:37:29,949 --> 00:37:33,159 about everyone who uses like Amazon s3? 747 00:37:33,774 --> 00:37:34,134 W. Curtis Preston: Mm-hmm. 748 00:37:34,989 --> 00:37:35,379 Prasanna Malaiyandi: Right? 749 00:37:35,489 --> 00:37:39,039 Because no one didn't, as far as I know, almost no one 750 00:37:39,039 --> 00:37:39,789 backs that. 751 00:37:41,454 --> 00:37:43,644 W. Curtis Preston: I, I, it is a problem. 752 00:37:44,364 --> 00:37:47,514 It is definitely a, a thing that needs to be discussed, and it's a 753 00:37:47,514 --> 00:37:57,399 thing where, Um, I firmly stand on both sides of that, of that story. 754 00:37:57,699 --> 00:37:58,209 Right. 755 00:37:58,599 --> 00:38:03,849 Um, that, that's a, yeah, we will definitely, um, we will definitely 756 00:38:03,849 --> 00:38:07,629 talk about that concept and you will hear me waffle back and forth. 757 00:38:08,769 --> 00:38:13,749 And part of it is, um, it's a little bit different in that. 758 00:38:16,059 --> 00:38:21,519 The, the multiple locations and we're get, we're got the cart before the horse. 759 00:38:21,519 --> 00:38:28,419 But you're deal, you, you have something that is, um, you have features that 760 00:38:28,419 --> 00:38:34,569 include both protection against node and site failure and human failure. 761 00:38:35,289 --> 00:38:35,499 Prasanna Malaiyandi: Yep. 762 00:38:35,589 --> 00:38:38,649 W. Curtis Preston: So if you have stuff that deals with both 763 00:38:38,649 --> 00:38:44,769 of those, um, That, that's where I start to waffle a little bit. 764 00:38:44,964 --> 00:38:45,324 Prasanna Malaiyandi: Yeah. 765 00:38:45,654 --> 00:38:46,404 And we'll get to that 766 00:38:46,404 --> 00:38:46,914 at some point. 767 00:38:46,914 --> 00:38:47,094 Yeah. 768 00:38:47,094 --> 00:38:48,504 Well, when we get to the chapter on 769 00:38:48,579 --> 00:38:50,499 W. Curtis Preston: And we're not, and we're not gonna solve that. 770 00:38:50,649 --> 00:38:51,669 We're not gonna solve that. 771 00:38:52,859 --> 00:38:54,144 That problem when we get there. 772 00:38:54,594 --> 00:38:56,754 But anyway, so this is the basics. 773 00:38:56,784 --> 00:39:01,464 Uh, by the way, if you, if I think that resource db-engines.com, 774 00:39:01,674 --> 00:39:03,834 uh, is a great resource. 775 00:39:04,374 --> 00:39:10,644 Um, and, uh, to help you understand all these different models, um, and, and to 776 00:39:10,644 --> 00:39:12,804 understand which model your database that. 777 00:39:13,399 --> 00:39:17,569 That you're, uh, using, um, we didn't mention Postgres, right? 778 00:39:17,569 --> 00:39:21,559 Postgres is another very popular, uh, I think it's gotten a lot more 779 00:39:21,559 --> 00:39:25,399 popular over the years because 780 00:39:26,749 --> 00:39:27,169 what? 781 00:39:28,239 --> 00:39:30,159 Prasanna Malaiyandi: I was thinking like the web app development stuff. 782 00:39:30,159 --> 00:39:30,669 I think they 783 00:39:30,669 --> 00:39:31,809 use that a lot more. 784 00:39:32,959 --> 00:39:36,409 W. Curtis Preston: Yeah, I, I think it's got, it's, it's, it's an open 785 00:39:36,409 --> 00:39:40,749 source product that probably has the. 786 00:39:41,559 --> 00:39:48,279 Like data integrity stuff built into it compared to MyQ l Um, there's complexity. 787 00:39:48,279 --> 00:39:51,339 It goes with that, but I think that's, you know, that's the thing with that. 788 00:39:52,389 --> 00:39:53,109 Uh, all right. 789 00:39:53,109 --> 00:39:58,929 Well, uh, enough talking about databases, we will do part two coming up and talk 790 00:39:58,929 --> 00:40:00,939 about how to back these things up. 791 00:40:01,509 --> 00:40:03,759 Uh, that's, and that's really you. 792 00:40:05,994 --> 00:40:06,834 That's really what we 793 00:40:06,894 --> 00:40:07,254 Prasanna Malaiyandi: The meat and 794 00:40:07,344 --> 00:40:08,844 W. Curtis Preston: That's really what we wanna talk about. 795 00:40:08,994 --> 00:40:09,474 What's that? 796 00:40:09,504 --> 00:40:10,314 The meat and potatoes. 797 00:40:10,319 --> 00:40:11,214 Yeah, absolutely. 798 00:40:11,994 --> 00:40:15,474 All right, well, uh, thanks for, you know, the usual good 799 00:40:15,479 --> 00:40:17,574 questions, et cetera, Prasanna. 800 00:40:17,604 --> 00:40:21,894 Prasanna Malaiyandi: try Curtis and I hope you have a wonderful rest of your Monday. 801 00:40:21,894 --> 00:40:23,374 Happy 200th episode. 802 00:40:23,934 --> 00:40:25,284 W. Curtis Preston: Happy 200th episode. 803 00:40:25,764 --> 00:40:29,454 And, uh, thanks to those of you that have listened on those 200 episodes. 804 00:40:29,459 --> 00:40:31,494 By the way, if you haven't listened to all 200 episodes, 805 00:40:31,499 --> 00:40:32,784 you got some catching up to do. 806 00:40:33,444 --> 00:40:38,544 Um, and, uh, remember to subscribe so that you can restore it all.