1 00:00:00,780 --> 00:00:09,780 ‫So here's the thing, so a database engine is nothing but a library that take care of the disk storage 2 00:00:09,780 --> 00:00:17,050 ‫and the crud operations like create and update and delete on the actual describe, because guess what? 3 00:00:17,070 --> 00:00:21,840 ‫When you do insert into a table values one, two or three. 4 00:00:22,050 --> 00:00:25,020 ‫Well, what happens here is there are a lot of layers. 5 00:00:25,020 --> 00:00:32,130 ‫And the lowest layer is we're going to take your denim, flush it to describe whether this is it's deeper 6 00:00:32,370 --> 00:00:36,240 ‫or just in a normal, hard, hard drive. 7 00:00:36,420 --> 00:00:36,780 ‫Right. 8 00:00:36,780 --> 00:00:38,020 ‫Spinning wheel. 9 00:00:38,130 --> 00:00:38,450 ‫Right. 10 00:00:38,640 --> 00:00:41,780 ‫There is there is a library that does that. 11 00:00:42,450 --> 00:00:48,200 ‫Most of the databases has always merged this kind of a database into one monolithic thing. 12 00:00:48,240 --> 00:00:48,570 ‫Right. 13 00:00:49,620 --> 00:00:53,150 ‫But recently, this has started being broken into. 14 00:00:53,240 --> 00:00:57,840 ‫OK, let me break these libraries into two parts. 15 00:00:57,840 --> 00:00:58,070 ‫Right. 16 00:00:58,080 --> 00:01:04,440 ‫The data, the actual work to store on the disk versus the actual work to do, for example, a client 17 00:01:04,440 --> 00:01:04,950 ‫server. 18 00:01:05,100 --> 00:01:06,120 ‫That's different. 19 00:01:06,420 --> 00:01:06,730 ‫Right. 20 00:01:06,740 --> 00:01:14,350 ‫And I want I want this to be separated from this so I can like classic classic reusability software. 21 00:01:14,350 --> 00:01:14,640 ‫Right. 22 00:01:14,820 --> 00:01:21,720 ‫This database engine can be as simple as just the key value store really is just example, a level. 23 00:01:22,060 --> 00:01:22,370 ‫Right. 24 00:01:22,680 --> 00:01:26,910 ‫So I can put a key there's a value store to disk that set. 25 00:01:27,150 --> 00:01:27,380 ‫Right. 26 00:01:27,400 --> 00:01:33,020 ‫And it could be as rich as complex to support full acid transaction. 27 00:01:33,030 --> 00:01:35,160 ‫And we talked about it, guys, I'm going to reference it here. 28 00:01:35,370 --> 00:01:40,620 ‫Atomistic consistently isolation and right and support transaction supports foreign keys. 29 00:01:40,920 --> 00:01:47,670 ‫All these functionality could be moved to the database engine and that's could be could be really powerful 30 00:01:47,670 --> 00:01:51,030 ‫for people who want to create new databases. 31 00:01:51,030 --> 00:01:51,290 ‫Right. 32 00:01:51,610 --> 00:01:53,520 ‫So I say, let me just use this engine. 33 00:01:53,520 --> 00:01:54,990 ‫I don't want to write my own engine. 34 00:01:54,990 --> 00:01:55,270 ‫Right. 35 00:01:55,800 --> 00:01:59,110 ‫So, yeah, database could very could be as simple as this. 36 00:01:59,130 --> 00:02:01,650 ‫It could be as complex as have all these features. 37 00:02:02,340 --> 00:02:07,650 ‫So RDBMS can use the database engine and build features on top of it. 38 00:02:07,650 --> 00:02:07,970 ‫Right. 39 00:02:08,130 --> 00:02:09,180 ‫You might say Hosain. 40 00:02:09,180 --> 00:02:12,990 ‫Well I thought that it was just storing stuff on disk. 41 00:02:12,990 --> 00:02:13,170 ‫Right. 42 00:02:13,170 --> 00:02:14,190 ‫That's its job. 43 00:02:14,190 --> 00:02:18,540 ‫Well, you're wrong because databases support so many other features. 44 00:02:18,540 --> 00:02:22,780 ‫And if you and I don't use it, enterprises use it. 45 00:02:23,520 --> 00:02:32,370 ‫So like server application, I want to I want to do a master follower setup where I have master database 46 00:02:32,370 --> 00:02:33,780 ‫or a leader database. 47 00:02:33,900 --> 00:02:39,650 ‫And I want this follower node to copy its data that that has nothing to do with storage. 48 00:02:39,660 --> 00:02:39,990 ‫Right. 49 00:02:40,260 --> 00:02:42,030 ‫This is a feature of the database. 50 00:02:42,180 --> 00:02:48,360 ‫So you want to build this at the DBMS level, this database engine level. 51 00:02:48,960 --> 00:02:59,040 ‫So isolation, some databases do very high level isolation at the database level, database software 52 00:02:59,040 --> 00:03:01,050 ‫level stored procedures. 53 00:03:01,050 --> 00:03:04,980 ‫Fording Keith, so many things features that the database can support. 54 00:03:05,220 --> 00:03:05,580 ‫Right. 55 00:03:05,820 --> 00:03:09,110 ‫But it's independent of the engine storage stuff. 56 00:03:10,080 --> 00:03:13,650 ‫So if you want to write a new database, you don't have to start from scratch. 57 00:03:14,070 --> 00:03:18,600 ‫Just pick up an engine, pick up one of those engines are we're going to talk about and then write your 58 00:03:18,600 --> 00:03:19,830 ‫own database on top. 59 00:03:20,040 --> 00:03:29,580 ‫And you can be you can you can design your database to fit a single good use case that maybe the general 60 00:03:29,580 --> 00:03:33,570 ‫purpose databases out there don't outfits you use case. 61 00:03:33,570 --> 00:03:33,980 ‫Right. 62 00:03:34,230 --> 00:03:35,670 ‫So you can start thinking on it. 63 00:03:35,670 --> 00:03:43,500 ‫And that's where we start to see a lot of databases, software being being created because there are 64 00:03:43,650 --> 00:03:45,060 ‫specific use cases. 65 00:03:45,240 --> 00:03:51,780 ‫And to be optimal in this day and age where latency really matter where, where, when performance really 66 00:03:51,780 --> 00:03:52,160 ‫matter. 67 00:03:53,160 --> 00:03:55,500 ‫Well, I'm going to create my own database. 68 00:03:55,720 --> 00:04:05,490 ‫And I'm I am just defining my my workload so that it is for example, it's a very high end sort of total 69 00:04:05,520 --> 00:04:06,090 ‫workload. 70 00:04:06,240 --> 00:04:09,270 ‫But I barely read from my database. 71 00:04:09,450 --> 00:04:09,730 ‫Right. 72 00:04:09,900 --> 00:04:10,460 ‫I don't know. 73 00:04:10,470 --> 00:04:12,960 ‫This could be like a cold storage kind of a thing. 74 00:04:12,960 --> 00:04:14,760 ‫Like I'm I'm I'm starting log's. 75 00:04:15,450 --> 00:04:19,080 ‫Just let me store my logs and I don't really care about reading. 76 00:04:19,080 --> 00:04:20,880 ‫So that's one use case. 77 00:04:21,000 --> 00:04:26,490 ‫Another use case could be, hey, I'm barely writing to this thing, but I'm reading a lot. 78 00:04:26,490 --> 00:04:28,110 ‫So make read very fast. 79 00:04:28,260 --> 00:04:30,620 ‫I don't care if you're going to sacrifice rights. 80 00:04:30,960 --> 00:04:32,910 ‫OK, so you can play with this stuff. 81 00:04:32,910 --> 00:04:33,180 ‫Right. 82 00:04:33,900 --> 00:04:37,800 ‫Sometimes referred to as a storage engine or embedded database as we talk. 83 00:04:37,800 --> 00:04:38,040 ‫Right. 84 00:04:38,040 --> 00:04:43,520 ‫Embroideries means you can take it as it is and run it on your software on yourself. 85 00:04:43,860 --> 00:04:47,490 ‫You can run it on your laptop immediately, directly. 86 00:04:47,490 --> 00:04:50,480 ‫There is no client and server connection, right? 87 00:04:50,580 --> 00:04:54,000 ‫It's a single library that you import in your code. 88 00:04:54,000 --> 00:04:58,790 ‫And once you open up your software, it just exists, right? 89 00:04:59,490 --> 00:04:59,850 ‫Very. 90 00:04:59,950 --> 00:05:08,950 ‫Awful stuff, so some DBMS gives you the flexibility to switch engines, just like my Wal-Mart, EDB 91 00:05:08,950 --> 00:05:16,960 ‫or persona another fork of my school, I couldn't find another database that I me to switch engines 92 00:05:17,230 --> 00:05:18,250 ‫except my school. 93 00:05:18,700 --> 00:05:20,880 ‫But I might be I might be wrong there. 94 00:05:20,890 --> 00:05:22,120 ‫So correct me if I'm wrong. 95 00:05:22,660 --> 00:05:23,770 ‫Some database. 96 00:05:24,850 --> 00:05:30,850 ‫DBMS database management system that is comes with a built in engine that you cannot change, Bosco's 97 00:05:30,850 --> 00:05:32,200 ‫is an example here, right? 98 00:05:32,470 --> 00:05:35,750 ‫You cannot change the engine of Polska just to be something else. 99 00:05:35,770 --> 00:05:37,240 ‫It's always better, I believe. 100 00:05:38,080 --> 00:05:38,710 ‫And that's that. 101 00:05:39,040 --> 00:05:41,090 ‫You stuck with Beatriz's, right? 102 00:05:41,560 --> 00:05:42,040 ‫So. 103 00:05:43,250 --> 00:05:50,270 ‫Maybe that's a good thing, maybe that's a bad thing and I'm trying to remember was switched from I'm 104 00:05:50,270 --> 00:05:55,520 ‫not sure whether they switched from a they switched either from Postgres to my school, from my school 105 00:05:55,520 --> 00:05:56,150 ‫to Bosco's. 106 00:05:56,180 --> 00:05:58,460 ‫I need to confirm this information. 107 00:05:58,470 --> 00:05:58,780 ‫Right. 108 00:05:58,980 --> 00:06:03,920 ‫I they switched for a reason, I think now or that that was part of the reason. 109 00:06:04,130 --> 00:06:08,260 ‫So I just confirmed I'm going to link the the article below. 110 00:06:08,540 --> 00:06:12,140 ‫So they switched from Posterous to my school. 111 00:06:12,320 --> 00:06:12,740 ‫Right. 112 00:06:12,860 --> 00:06:19,370 ‫I don't know the reasons, but probably one of the attractive reasons for my school is the ability to 113 00:06:19,370 --> 00:06:20,300 ‫switch engines. 114 00:06:20,300 --> 00:06:21,230 ‫The underlying engine. 115 00:06:21,230 --> 00:06:22,670 ‫You're not stuck to one engine. 116 00:06:22,670 --> 00:06:28,400 ‫You can you can create a table with this engine my eyes and then create another table with another completely 117 00:06:28,400 --> 00:06:30,650 ‫different engine that does completely different things. 118 00:06:30,650 --> 00:06:32,150 ‫So that's kind of attractive. 119 00:06:32,150 --> 00:06:35,480 ‫I'm not saying that's the only reason I'm going to reference the article below. 120 00:06:35,690 --> 00:06:38,810 ‫So they actually switched from PostScript to my sequel, right? 121 00:06:39,770 --> 00:06:41,840 ‫All right, so that's that's another attractive thing.