mergeconflict299 === [00:00:00] James: Frank to Morrow, March 29th, 2022. We are recording episode 300. [00:00:21] Frank: My God, it was live, live. Oh my God live. What are we doing? This is insane. We haven't done a live one in a long, long time. [00:00:28] James: James. This is six years in the works. [00:00:33] Frank: Six years. Wow. Yes, I have 300 was scary, but now that you said six years, that's even scarier. Thank you everyone for listening. And I think you're, you're, you're, we're about to make a big request of everyone. Okay. [00:00:45] James: Yeah, so you have one more day literally to go. We're going to be doing this. You will find a link in the show notes below to the YouTube live stream page. You can schedule it, you can get on it, you can do this stuff. You can also go watch it live later as well. You can join any, come chat us. It's going to be at 5:00 PM Pacific time on the 29th of March, 2022. And we're asking you. Send us a clip. We have the capabilities of playing back clips, video or audio video would be preferred to make my life a lot easier. Ellis. If it's audio, we'll totally get it in there to let us know what your favorite episode was. And you have a question for us, ask us live your voice. Your face could be on a merge conflict episode. So thousands upon thousands of millions of our lists. Send us an email, hit us up on Twitter or do whatever you want to reach out to us in any way and send us a file somewhere on the internet and we'll download it and we'll put it in the. [00:01:39] Frank: Yeah, and this is perfect timing because all programmers are procrastinators. So I'm sure everyone was just waiting to this moment to get it done. So, yep. You have one more day. Um, but even if you can't record one, we totally get it. Uh we'll hope you still just join us to watch the show and take part in the chat room. I'm sure we'll have a chat room and everything too. And it's just going to be a fun hangout session. We'll try not to let it get too off the handle. [00:02:07] James: No, it'll be, we'll have a topic. We'll the thing. We'll do some stuff, but we love for all the talents, a timer for the lightning [00:02:13] Frank: rounds. Yeah. Yeah. That that'll keep us focused. [00:02:18] James: Yeah, I think so. I got to figure how to do that now. Okay. Well, all right. Well, I put out a tweet, Frank that I thought was highly. Highly entertaining, um, which is ends up becoming episode 2 99. I couldn't, I couldn't honestly think of our crescendo up to two episode, 300 then going back to where you and I started Frank. Oh, [00:02:42] Frank: good call. Yeah, that's true. Well, I mean, technically we started on settings, but I think I was introduced to you as, hi, this is Frank Krueger. Uh, he wrote a SQL Lite thing. I believe that was our formal introduction to [00:02:55] James: each other. And then. Krueger of Krueger. Inc. The person that has copyrights all over my source code. Cause I use sequel light dash net everywhere in my applications that Frank Krueger, what? And then you're like, damn, that's me. Ha [00:03:12] Frank: uh, let's talk about settings for the rest of the night. Yeah, I I'm I'm impressed that you read the, a license, but I guess it was right at the top. You can just can't avoid [00:03:20] James: it. No, that was back in the day. It was, it was just a file inside of your source. [00:03:26] Frank: Yeah. I mean, it started out on an, uh, an email group back when I used to do email. So we just had a big mailing list and I actually posted it to the mailing list. And I actually did that for a couple of versions. And then people are like, Frank, have you heard of this thing called source control? [00:03:42] James: And you're like, wow, no, what I need [00:03:45] Frank: Dropbox. Yeah. And actually it started out on a Google. And have so talk about picking the wrong horse in that race. Uh, well, uh, yeah, thanks to, uh, Kush. We got it over to get hub. [00:04:00] James: Yup. And it's there and then I use it and I still use. Every single day. And I found a little surprise in my IntelliSense, an Easter egg, if you will, Frank talking to me through the comments which I enjoyed. So let me set up the scenario here for everybody, because you might also be living in this scenario that I am currently living in myself. So Frank, I have an application that's called my cadence. I don't know if you've heard about it. Um, [00:04:29] Frank: Uh, I don't know, but I assume it probably just displays a number and if you're lucky a graph, yes, that is [00:04:36] James: correct. It literally just out several numbers as well, actually. And they, they are, they're all moving in real time. Every second they change. Uh, so this is my, my biking application. I've talked about 5 billion. Uh, and, and I love building apps because we get to talk about real things that I encounter and you encounter. It's [00:04:56] Frank: important that our subject stay grounded. Like we could sit here and architect astronauts all the time, but at some point you got to update a number every one second, and you got to make some critical decisions on how that number is going to get updated on the display. And perhaps. Recorded to a database is [00:05:13] James: very true. So earlier this year, last year, late last year, I added a new features into my app that would take your ride and store it into a database, a SQL Lite database, if you will. And, and we talked about different ways of storing the data and things like this. And I settled on a nice format and. Uh, the users that upgrade can then look at their history. Uh, and, and if they, if they upgrade later, all their history is still there because why not just save it into the database anyways, not hurting anybody like to just put it there. It's a nice surprise. If they upgrade all your data's there. Wow. It would in fact, a great promotion is. Just want to let you know, you've written 45 times. Do you want to see your sweet data with charts and graphs and info? And I got to put that in my app a little bit [00:05:59] Frank: great out or something like that. Yeah. So have you done measurements? Do you know roughly kilobytes per I don't know. Let's say an hour. How long does someone use it? You're out. [00:06:11] James: Uh, Ooh. I think the, I mean, I don't have metrics or analytics, but at least for me, I would imagine the normal rides around 30 minutes. [00:06:20] Frank: And then is that like a hundred kilobytes or is that like a megabyte? [00:06:24] James: Oh no, no, it's pretty small. I would say overall, what I, what I do is I do timestamping. So the default is to take a average reading of the number every five seconds, which is just an integer in an array. [00:06:43] Frank: An average one, like a moving window or something [00:06:45] James: like that. Correct? Because plotting every single second onto it, it doesn't change that often. You know, you don't really get a smooth graphs. I wanted to smooth that out. So I defaulted there. So I think it's relatively small. If I looked at my, I just put, it was putting in a feature currently today, which is, or this week, which was exporting the data and reimporting it. So let's say you get a, a new device. I wanted a way of. Um, exporting the data and reimporting the data, uh, into it. So let's say I have here, I don't know, 20 rides. That was about 43 kilobytes of, uh, Jaison files. I don't know what that would be in the database, but I assume small. [00:07:25] Frank: Okay. Yep. Um, and then you just have one database for everything. Is [00:07:30] James: that one database, one table go one day. So, so my import export feature was this frankly. Uh, cause I could, I first thought about, Ooh, Frank, what if I set up a, what if I set up like a web server and they L and then I was like, that's going to cost me money. That sounds bad. Yeah. So welcome. So I said, I said, well, I know how to read vials and write files. So. What if I say export the data and I, instead of just exporting the database, I export the data in the database into adjacent a file that is versioned. I add a little, little thing in there, version one. So I know what versions of the app support different data schemes, if it ever changes, and it will never change, but just in case. So I, I send that file and say, save this file onto a. Or upload it to your cloud or to your email, go to your other device and then download. And re-import that file. Okay. [00:08:31] Frank: This is the whole database, not just like one ride. This is the whole [00:08:35] James: everything, but the whole shebang, everything. And then in [00:08:40] Frank: your case, it's just one table though. So that you were being serious there it's [00:08:43] James: one table. Cute. Love it. So it's just, here's all the data [00:08:49] Frank: you need. Oh, I see what you're going to do in my heart. Just sank. Okay. Okay. Oh, okay. I see. What's coming next to everyone. [00:08:56] James: I'm scared. So they pick the font. And then you get an option. It says, how would you like to import your data? You have two options, Frank, you can, what can [00:09:06] Frank: you do, Frank? Let me say, let me say, okay. The hard part of transferring data is not transferring data. Everyone that's easy. We solve that in 1940 or something. Oh, signal theory. It's been around transmitting data is a breeze it's built into the API. That's built into our programming language. You know, what's not built into the API and what's not built into programming languages merging data. That's correct. Yeah. So now you have to merge, which is a pain in the butt. If you don't design, um, your protocol, your messages, your, your data tables, all that. If you don't design it ahead of time, knowing that you're going to have to serve, solve a problem. Well, you don't have too many options. So we, you can put. Punt on the merge problem, which is delete the database and reimport it, which is really where I'm afraid you're about to go. Or you could do something smarter and have like globally unique IDs, put a goo ID somewhere, check if that glue, it exists only merge in et cetera, delete things that were in one, not in the other, you know, you do a Def and then you apply that. [00:10:15] James: Correct. Yeah. So, so I really give the user two options. One is merge with existing data and override existing data. And I was going to go with the latter as the only option. And then I said, well, what if I got a new device or to doing rides? And then I was like, oh, can I import my old data? Oh, I can. That's cool. And do that. So the, okay, well now I know that I have a huge issue with my merge, but here's what I'm doing. My merge because. The speaking to me, doesn't come during the merge. So let's cliffhanger this, which is great. So, um, the merge, here's what I'm planning on it. Don doing, which is taking all the data that I read from the file and adding them as new rows into the database. That's how you merge. So you don't need, I don't need, I'm not doing any fuzzy logic matching to be like, is this a unique D or ID or did they start the ride at the exact same time? Although that would be smart. I'm just saying you're taking the data and you're shoving it. Side-by-side. And done. [00:11:11] Frank: Do I have a question for you? Did you work on the contacts app for apple? [00:11:17] James: I did. I, I dunno if you know, you're headed in an effort on [00:11:22] Frank: engine for that. [00:11:24] James: So I, Frank Frank, I, I, I kid you not, I was inspired by the Siri contact because when Siri cup pops into your I message series, like, Hey, I just want to let you know, I found a new photo. Oh, I found a new thing for Frank and I said, okay, update, update, update. And then I go in there and Frank's birthday is in there 45 times. Yeah, [00:11:47] Frank: exactly. They're inspired by that. You're like, look at that data duplication. That makes it sound that gap that guarantees the data's there. If it's duplicated in a hundred spots, [00:11:57] James: because you always have the option as the user me to delete one of those birthdays for [00:12:01] Frank: you. Oh, that is so much easier than the programmer taking 15 minutes to generate a semi unique hash of the data and do a simple existence check on the existing data. So what you should do is you can either do entity equality, or you can do structural equality, entity equality would be your global unique identifier. And you just have a simple policy. If that code's not there, I add it. If it's there, I leave it alone. The other one is you take roughly a hash of your data. So, you know, you implement the hash code for all the members of your data class, and, uh, you call that you call that on the existing data. It's a little trickier from the database perspective. Put that into the query or something. And then you can tell if it exists or not, if it does exist, whatever you can do emerges. Also, I have a library out there called list stiff. I highly recommend it. Uh, yeah. Okay. I I'm making fun of you. I guess people are tolerant of duplicates. I just hate duplicates. [00:13:06] James: Yeah. I could be really smart about it now. Unfortunately for me, I do not have. Gwinnett. I just have an integer ID, which my good friend SQL light is generating for me and incrementing every single time. And that, and that's unique for the database not there. So this is good, sort of a good learning lesson for me, which is it could have been. Oh, interesting for me just to generate a new quid randomly for every single one. Just as a, this is a unique identifier. That's not the database identifier. [00:13:40] Frank: Yeah. Um, auto incrementing row IDs are. So enticing, you know, you put an integer there, you give it a primary key auto increment and Presto bang. Oh, you got a beautiful ID system. That is, I don't know, is it easier or harder than having to type , you know, all over the place, but the lesson I've learned, if there's even a small chance that this data is ever going to be uploaded to a server or merged in with something, this is all about merging. If you're doing specific file formats, you don't have to worry about March. Um, I, yeah, uh, good. And it doesn't even have to be a good, it can just be a random string. It can be literally anything so long as it's very big and very random. [00:14:25] James: Yeah. I think that, that's the, the main thing that I probably need to do that being said. I think the other thing I should do is just compare. Do a comparison and say, Hey, what I'm going to do is I'm going to check my database and see if anything with the exact same data exists because they can't modify the data. I mean, right in the Jason file, they could, but you know, like, Hey, you can only do this stuff and that's it. So I do think that that's probably the winner now that. Yeah. [00:14:54] Frank: Yeah. So I call those structural hashes, but you can implement it however you want. You do a dot equals function. Um, if you are using light net, you'll have to write it as a SQL query. So inside your link clause, however you want that kind of stuff to work. It's a good way to go. Um, do, do you keep a date? You know, dates are really unique. You [00:15:16] James: could do have a date UTC. So I think I might just query that. [00:15:20] Frank: That is basically a good, um, I would be happy if something just, uh, did equality comparison purely on creation date. That's fine. Yeah. Cause when [00:15:30] James: you think about it, That the, the daytime UTC is down to like a milliseconds. I had assumed. So that is probably the last route that I'll do. [00:15:40] Frank: Uh, it's something like a hundred nanoseconds. Okay. Yeah. So that's, it's, it's stupid. It's it's accurate. [00:15:47] James: So what you're saying is not only add a date UTC into it, but also add a unique way to, and you have to think, but no, that is, it's [00:15:54] Frank: your query simple. So now you can just say if exists, blah, blah, blah. [00:15:58] James: Yeah. Yeah. So that is what I'll be doing tonight. It's out of my application, but so that's really, this is a great strategy. I didn't. And I was going to be lazy, but Frank you've made me not lazy. So I appreciate you for doing that. So [00:16:12] Frank: let's cover the lazy because he did introduce this tweet. So I think we should at least tell people how all this ended. So let me guess you did actually kind of start to go the lazy way you are going to try to delete everything in the table and just to add it all back, was that. [00:16:26] James: Well, let me tell you what I did, but before that let's thank our amazing sponsor this week sync fusion. That's right. If you need to delete a database, no think fusion is not there for that. Therefore seeing confusion is there to help you build beautiful applications with the world's best UI components. We for web desktop and mobile applications, listen, no matter what you need. They got you covered or you build an app with.net. Are you building with JavaScript or TypeScript or angular react or Java or anything? Pretty much. They got you covered. Let me just be honest with you there. I am so excited about it because I'm actually going to be doing like a webinar with them. And I built a blazer hybrid dynamo Maui application using the blazer sync fusion controls inside of my dynamic alley app. That means hundreds upon hundreds of controls for blazer are available, but additionally, they have dynamically controls too. So you can blend web and native controls altogether. I'm talking about things like, like charts and graphs and diagrams and list box, and combo boxes and cards and dash views and Towson progress spinners and PDF viewers. They can just do everything. It's amazing. They really honestly. You cover for everything is bid on that web forms, JavaScript, angular, react, UWP, flutter, Xamarin, WPF. When you, Y you name it, they have awesome things. They've got document processing for Excel, PDF, word, PowerPoint. They got a whole dashboard thing, and they also have. There's amazing UI toolkit that are easy to use templates to get up and running quickly. When you're building applications, go to sync, fusion.com/merge conflict. That's right. Sync, fusion.com/merge conflict. You can find a link in the show notes below and thanks to sync fusion for sponsoring this week's PA. [00:18:16] Frank: That was a great transition. Thank you. Sync, fusion, and wow. The combinations are kind of crazy. Aren't they? Yeah, the plays are controls on top of the Maui controls. Yeah, kind of crazy. [00:18:27] James: Yeah. I, you know, I didn't think about it until I was working with Alon and Dan and I forget that I saw that Alon had done this demo. He just found like a random, you know, control on the internet. He's like, check this out. And now it's in the thing. And I was like, what a second? It's it's it's bananas. I mean, so that just means this entire ecosystem is available to you and they look and they perform this scale and do all this stuff. It's super good. Anyways, go check them out and let's get back to databases, Frank, because [00:18:57] Frank: anyways, you're about to delete everything from a table. Well, [00:19:01] James: so let's talk about that second option, Frank. My second option was to override the data. Now some may say. Well, Frank, well, James, if you do merge data, correct. Why do you have override, right? I mean, that would make sense if you did the first approach, which was merge correctly, then really. There'll be no reason to override the data. And I say, well, I didn't think about that before this podcast, but, um, but in general, my thought process here was I was going to have one approach, which was import the data. The data goes in, your old data goes out easy-peasy right, because I didn't want to merge. I didn't want to think about things. It's additional logic, but I'm doing it now. [00:19:45] Frank: Let me interrupt because, cause that's totally fair. Um, I think of this in terms of UI table view programming. So whenever you get new data and you want to display it in a list view, you really should do a diff and tell that list view only the minor changes that have happened to it. But, you know, Life is short and we don't always have time to do a diff. And so you say dot reload data, because unless, unless it's taking more than a second, let's be honest. Um, it's fine. Once it, once you cross a second, you know, can get your act in order do things correctly, but you have a pretty big buffer. These things run really fast. Uh, you, you have a lot of flexibility here, so honestly I've been making fun, but the simple approach is quite. [00:20:30] James: Yeah. And then I started to go down this route and I said, okay, well, this there's gotta be a you adding, adding the data's not too hard. There's a transactions. And you can start a transaction, insert a bunch of data. And then, uh, Insert a bunch of data and then end the transaction. And I believe you even made it even easier to do. I have to, I have to look at my import export logic here. Yeah. Even [00:20:54] Frank: better. There's a function insert all which does the transaction for you. If you haven't used SQL Lite before transactions, aren't just there for safety. They really help with efficiency also. So if you were to put a bunch of inserts in a loop that they would take forever. So, um, there's an insert all where you pass it, a bunch of [00:21:13] James: objects. Yes. And that's what I ended up finding. So I said, okay, well, let me go over here and look at this. I have this ride database. And that's what I ended up doing. I say, oh, wow. Like, this is really, really cool. I'm going to go ahead and, and just insert Paul or whatever you just said. Right? So I'm like, oh my God, everything in a transaction. I'm like, wow. Frank is going to be real, imply impressed with my logic because I just do that. Now, the one thing I do is. Make sure that I, I set my ID to negative one. So it auto increments correctly. Um, because that would be bad. I'm not really sure. I always get scared, like inserting I know it is insert all, but I'm not sure if it's like insert or update all or if that's the same or if it's different. So I just make sure the right idea is negative one, but yeah, just do insert all and then I pass in. True. And then boom, bingo, bingo. It's one line of code and I was like, wow, this is cool. There must be a. To also delete all because I want to, basically at this point I want to delete everything and then insert a bunch of stuff. Cause I was like, that would be cool. And then. And I got this little pop-up Frank and the IntelliSense with big, it was yelling at me. I says, it says, this is what it says. It's it's, it's, it's in, it's on the database object and it's called delete all async and you pass it a type that you want to delete, which is the, the row it says deletes the table. Uh, yes, all the rows. It's all it says, deletes all of the objects from the specified table. Then it yells at you warning, warning, warning. Let me repeat it. Deletes all in all caps, you could bolt, he would bold it if he could. Um, yeah. The objects from the specified tire type table. Do you really want to do that? And I was like, yeah, I do want to do that. And then you said databases shouldn't allow. And then I was like, well, Frank, if database is shouldn't. Delete. Why does your database ORM have a delete all and a delete, delete method audit. [00:23:23] Frank: Well, James, you're going to open this can of worms. Are you okay? We're going to go here. Uh, I, you know, I'm curious when I actually did add, delete all. I think I resisted it for a while. Mostly as a safety concern. I didn't want people like calling the wrong overload of delete or something like that, you know, just by accident. So it, that it was more of a safety there, but enough people wrote in and said, Frank, just give us a delete. All. So my response to you was databases shouldn't allow delete. And this is just a slight pet peeve of mine, of the databases that we use, that we're kind of stuck with. The databases we use were developed in the 1950s, 1960s, 1970s, the algorithms were developed and the way you access them was developed, then. You know what? Back then, there was very little memory out there and memory was terribly expensive. And so you had to make sure that you overwrote your variables. You deleted things because you could run out a memory very fast and memory is very expensive. True. Free these days, memory, like your database is so small, it can easily fit within like the cash levels of the CPU that you're using. Let alone the Ram of the CPU that you're using. And so. It's a little bit just of an annoyance of mine that, um, databases are destructive and that's not good for data. This is kind of coming from my functional background too, but also I worked in banks and in banks, we were always worried about destroying data accident. Obviously, if you're running a good place and all that, you're not, you don't ever want to destroy data there and your updates that destroys data that overwrites the column. So whatever data was, there is gone forever. There's no undo in a database. There's no revision. In a database in these old style databases. And once you hit delete that object is gone forever, you cannot recover it. And so it's just this. And I think a lot of database people come to this, we call it soft, delete. You put like a, is deleted column on every object. And eventually you create a revision history for every object and events. Eventually you create a transactional history for every object. And this is how a modern database is designed. Something like get is a write only database. You can not destroy data and get it's impossible unless you do a reset and overwrite this stuff, obviously, but by the semantics of the database, that is a right only database. Nothing can be destroyed. And I think that's how these systems should be. [00:26:07] James: Yeah. So we had some good comments too, and it, which was, which was kind of go Clancy chimed in. And he said, oh, he said, it depends on the table, especially on mobile. What if it's an upload queue? Uh, like to clean up after there. And I said, well, you know, he likes [00:26:22] Frank: to, but does he need. You know, it's a funny thing, right? You can easily say upload completed and leave it in the database. And the way SQL Lite works that it's not taking, it's only taking up flash space. It's not taking up Ram. It only pulls into memory what you need into memory. And so he likes to clean up. It is a valid argument. Delete is totally valid. If you are writing gobs and gobs of data and you, um, are going to run out of space, but otherwise. [00:26:53] James: Yeah, really what we're talking about is I think David kind of says, this is like, you'd have to create an un-delete right. When you think about like, when you drag something into the recycle bin, that is a soft delete, right? It is, it is deleted and it's not really gone. Right. It's just in this special place that really marks. Don't show me. It's not right. It's more like invisible mode. Right. And yeah. Uh, I think Timothy also talks about acid, which, uh, acid, not the acid that would hurt you, but it is a Thomas city consistency. Isolation durability, a set of properties of database transaction tended to guarantee data validity to that, of all the stuff, assets, um, which I, you know, I, I haven't really thought about acid for a long, long time. And, you know, Timothy says, you know, that's kind of the D and acid. He's like, how can you prove you deleted the rows in a table if you actually deleted them? [00:27:46] Frank: Yeah. But you're confusing. The semantics of delete with. What memory locations are used to represent that to Lee. Those are two [00:27:53] James: totally different things. The real difference that you're saying is that there should be a bullion flag that says. Deleted. Yeah. And, or, you know, or hidden or visible or whatever, and it sets it to true or false, right. Or [00:28:08] Frank: you create a, a Merkle tree like it does where everything is rooted. And so if it doesn't exist in the tree, then it doesn't exist. It's deleted quote, quotes around it. However that object is still in the database because there may be a different tree out there. That does include that object. And the beauty of that kind of system has you get revisions also. So you get undo, you get, you get branches, you know, you get all that stuff and you get a more refined, refined merge experience because you can break your objects down to be smaller. So as much as I love sequel light, it is totally. It works great. And all that stuff I do in the back of my head, realize like this is 1970s technology. Like we we've done better than this. You know, I kind of wish we could just use get, uh, our, our, uh, database for apps because G is really good at sinking. You can send up a deaf, you can receive a deaf, you know, you can do all this kind of stuff. And so I think that the future. We need better technology. Now, a little bit of that is different. If you're, if you're like a web developer and you have a server and the server is the source of truth, but in a distributed world where maybe someone has like five exercise equipments, each one with five different devices and they want them to sync all into one database, it becomes a much [00:29:28] James: harder problem. Yeah, I think that does make a lot of sense. The only issue I really see with not deleted. Fully right. And maybe you have a solution for this. Like the bullying solution kind of gets complicated because you then have to ensure that all of your quarries to the database don't accidentally pull back a visible data. And I could see that being a little complicated over time. Although if you were to move data from one table into another table, Like a shadow table then that would maybe solve it. Cause you always want to query like a source of truth. Like that's the one thing I think in Clancy's scenario, it's very simple. Right. Which is a Hey database, what things haven't been uploaded yet done. Right. And then go, right. But I imagine the scenario where it's like, Hey, I have a lot of, you know, data and, and, and a lot of quarries throughout this application and a lot of developers are working on it. That could be. Someone could make a mistake. [00:30:33] Frank: Yes. You're a hundred percent right. But at the same time, I have yet to see an enterprise system that doesn't employ this technique because the auditability is much more worth it. The revision history is much more worth it. If you're doing contracts with a company you want to be able to see what was the contract last year versus what it is this year. I think. All enterprise developers are probably rolling their eyes right now. They're like, James, you have no idea. We have 22 status columns and you've got to come up with the right combination to know whether it should be displayed in this UI or that UI, because the alternative is to, this is duplication, uh, where you have like archive tables or something like that, or you delete the data and then now you're not auditable. Now you can't go see what was the status last year versus this. [00:31:24] James: That makes sense. I think. [00:31:27] Frank: Got it. Sorry. And also just in favor of the immutability of how a database should work corporations, large enterprises like this, they have giant databases, huge. Just, just mind. Bendingly large amounts of Ram and storage is involved with it. But I tell you, 99% of that are copies of each other and they're copies of each other because everyone is afraid of stepping. Other people's toes of accidentally deleting the data or doing something like that. If you had a right only database, it can share nodes, just like get, can share objects throughout, uh, commits. And so there's a lot of efficiencies to be gained. I don't know why I'm just, I just want to make it clear that right. Only databases make a ton of sense, especially in a distributed [00:32:14] James: world. You heard of people, right? Only databases. That's all we should ever create. I mean, I. Most of my applications have only ever been right only anyways. So yeah, I'm thinking about it. [00:32:29] Frank: Yeah, it's an extra step. And if you don't get the benefits of it, then don't bother, um, like your, your merge is pretty simple. That that's fine. Uh, if you're doing something weird or like maybe real time merging or something like that, you know, if you're doing something more like a game where if smatter than it would be different, but you know, keep it simple. I'm a big fan of keep it simple. So again, if the delete all insert works, that's fine. Make sure to run that in a transaction. Please, please do not run, delete all, and then insert because who knows what can happen between those two, run that in a transaction. So it happens safely. Yes. Uh, or be smarter and, uh, do any equality merge. And if you want to be really fancy, do a diff urge. [00:33:13] James: I think, uh, I think I'm going to, I'm thinking I might trim it down just to merge the data and that's it because. It'll be fun. [00:33:20] Frank: It'll work. Yeah. And just make sure you throw exceptions. If anything go bad goes wrong because that's your way of preventing the data. Cause all that's going to run inside of a transaction. And so as long as that transaction completes, the data will be, uh, an integral integrated. It'll be, uh, it'll have integrity. Yeah, that'll be good. [00:33:41] James: Yup. That makes sense. Cool. I like it. I like it a lot. [00:33:46] Frank: I'm sad. You won't get to use the delete all. And I should say, ah, I need to up my game a little, I'm noticing a lot of people are using emoji in their XML comments these days. And I think my warnings need to turn into like actual sirens or, sorry. [00:34:00] James: Totally. I mean, I put emoji everywhere and let's just be honest about it here. My, my windows dot key on my machine doesn't work, what it works on my windows 11 machine, but I can't figure out how to get as broken. I'm a windows 10 machine, and I can't figure it out. No one else seems to be experiencing this, except for me. And it works on my Mac, which is, which is terrible combo. Cause it's like command control commands mandates days. Yeah. It was terrible. Um, windows dot makes a lot more sense or send me a column. I can't, I tried every ratchet. I trolleys hacks. If anybody's experiencing this, by the way, please let me know on Twitter, if you need tech support. So windows dot brings up the emoji window and it's fantastic. And I cannot get it to work. It's something broke on my machine and I can't, I didn't do anything. Rankin it's every profile is not just like a profile where I'm like, oh, I turned it off because you can't just turn it off unless you go to the red at it. And I'm not, I'm not randomly hitting up my red jet, very, you know, very often. But, um, anyways, please let me know if you're experiencing this issue because I need your [00:35:06] Frank: help with the most frustrating I feel for you, man. I hope I hope it gets resolved. [00:35:11] James: One day. Cause it's, cause what I'm doing now is I have to go to Emojipedia and then I have to go find my emoji and then I have to go and copy it and then bring it over. It's real bad people help me. How do people live without the emoji window? I don't actually know. It seems impossible. [00:35:31] Frank: There's a whole button for it on the iPad. I'm just pushed the button. [00:35:37] James: Yeah, maybe there's a button. Maybe there's some extension I can install. All right. I'm going to make more coffee, everybody ease. Right. In episode three, I'm just coming up. Thanks to our sponsor sync fusion. This week don't delete anything ever. That is what Frank is saying and telling you to do. And, uh, I guess I'm going to go fix my code. So thanks Frank. I really appreciate, actually, I learned a lot this episode and you're making my Outback this episode. It only took six years, but you, Frank made my applications. Every single day and especially this one and this feature. So thank you very much. [00:36:09] Frank: I just love talking about databases. We could go on for another four hours. You should get my feelings on a, on a, uh, insert or update. [00:36:19] James: Oh, actually, I do have a lot of questions, but we're going to save that for another day because this has been merged conflict. Um, James Montse Magno and I'm Frank [00:36:26] Frank: Krueger. Thanks for listening.