1 00:00:00,580 --> 00:00:01,600 - [Instructor] Next, let's talk about 2 00:00:01,600 --> 00:00:03,619 NoSQL columnar databases, 3 00:00:03,619 --> 00:00:07,770 which are also sometimes called column-oriented databases. 4 00:00:07,770 --> 00:00:10,875 These are similar in concept to relational databases. 5 00:00:10,875 --> 00:00:13,030 And in a relational database, 6 00:00:13,030 --> 00:00:15,300 one of the most common things that we do 7 00:00:15,300 --> 00:00:19,500 is using the data that's organized into rows of tables, 8 00:00:19,500 --> 00:00:21,450 we'll perform select queries 9 00:00:21,450 --> 00:00:26,450 that enable us to pick off specific columns of information 10 00:00:26,530 --> 00:00:28,520 across either all of the rows 11 00:00:28,520 --> 00:00:33,100 or only the rows that meet certain search criteria. 12 00:00:33,100 --> 00:00:36,390 So one of the problems when you're dealing with 13 00:00:36,390 --> 00:00:38,150 data in relational tables 14 00:00:38,150 --> 00:00:41,900 is that such queries can actually perform really poorly 15 00:00:41,900 --> 00:00:44,810 because you have to get every single matching row, 16 00:00:44,810 --> 00:00:46,840 find the required column, 17 00:00:46,840 --> 00:00:49,800 and throw away the rest of the row. 18 00:00:49,800 --> 00:00:53,800 So columnar databases are basically optimized 19 00:00:53,800 --> 00:00:58,667 for searching columns of data very rapidly 20 00:00:59,600 --> 00:01:01,820 in big data applications. 21 00:01:01,820 --> 00:01:03,830 So I provided a couple of links here 22 00:01:03,830 --> 00:01:05,330 where you can learn a little bit more 23 00:01:05,330 --> 00:01:07,220 about column-oriented databases. 24 00:01:07,220 --> 00:01:10,880 But let's just take for consideration purposes 25 00:01:10,880 --> 00:01:15,280 our authors table from the earlier examples in this lesson. 26 00:01:15,280 --> 00:01:17,619 And as you can see, we have some ID numbers 27 00:01:17,619 --> 00:01:19,360 for the different authors. 28 00:01:19,360 --> 00:01:21,490 And we have first names and last names. 29 00:01:21,490 --> 00:01:23,950 So we have rows representing authors, 30 00:01:23,950 --> 00:01:27,640 and columns representing specific pieces of data 31 00:01:27,640 --> 00:01:28,950 for those authors. 32 00:01:28,950 --> 00:01:33,650 And the ID column was one of the three columns in our table. 33 00:01:33,650 --> 00:01:36,660 What you're seeing here is the way it got displayed 34 00:01:36,660 --> 00:01:40,730 as a data frame when we rendered that table 35 00:01:40,730 --> 00:01:43,400 after querying its total contents. 36 00:01:43,400 --> 00:01:44,960 Now in a columnar database, 37 00:01:44,960 --> 00:01:49,460 rather than storing the data on an author by author basis, 38 00:01:49,460 --> 00:01:53,250 we store the data based on an attribute by attribute basis. 39 00:01:53,250 --> 00:01:55,650 So the first column, the ID numbers, 40 00:01:55,650 --> 00:01:58,429 is going to be stored in order by row. 41 00:01:58,429 --> 00:02:02,900 The second set of values will be the first names 42 00:02:02,900 --> 00:02:04,030 in the same order. 43 00:02:04,030 --> 00:02:05,677 And then we'll have the last names 44 00:02:05,677 --> 00:02:07,172 in the same order as well. 45 00:02:07,172 --> 00:02:12,172 So because the column elements are maintained in row order, 46 00:02:12,210 --> 00:02:14,860 when you get the value at a particular index 47 00:02:14,860 --> 00:02:16,440 from one of the columns, 48 00:02:16,440 --> 00:02:19,780 you can get the corresponding pieces of data 49 00:02:19,780 --> 00:02:21,518 from the other columns if you need them 50 00:02:21,518 --> 00:02:26,370 by accessing the same index number in those columns as well. 51 00:02:26,370 --> 00:02:29,200 And a couple of the popular columnar databases 52 00:02:29,200 --> 00:02:32,993 are MariaDB's ColumnStore and HBase.