1 00:00:02,140 --> 00:00:04,320 We're almost done with this module. 2 00:00:04,390 --> 00:00:09,740 Now let me show you two other important pieces of data you can put into your documents. 3 00:00:10,030 --> 00:00:16,170 You can use embedded documents and this is actually a core feature of mongodb and a core feature 4 00:00:16,170 --> 00:00:21,430 I'll come back to in my data schema and relations module in this course. 5 00:00:21,430 --> 00:00:27,820 Let's imagine this box is one document, embedded documents then simply means that you can have a field 6 00:00:28,030 --> 00:00:30,140 in your document like name 7 00:00:30,310 --> 00:00:35,560 but then this could be another document, so the value of the field could be another document and 8 00:00:35,560 --> 00:00:40,840 you can have multiple such documents and these documents can have other sub documents which can have 9 00:00:41,020 --> 00:00:50,010 other sub documents, so you can nest your documents all in one overarching document in one collection. 10 00:00:50,020 --> 00:00:55,150 So here we can have up to 100 levels of nesting in mongodb, 11 00:00:55,150 --> 00:00:58,040 this is a hard limit but you can have a lot of nesting 12 00:00:58,050 --> 00:01:04,960 and to be honest, you rarely need more than three or four levels and you always got another hard limit, 13 00:01:05,030 --> 00:01:09,790 the overall documents size has to be below 60 megabytes. 14 00:01:09,820 --> 00:01:14,900 That might sound small but since you only store text in there, you don't store files in mongodb 15 00:01:14,890 --> 00:01:20,710 for example, you would use your file storage for that, since it's only text, 16 megabytes is actually 16 00:01:20,710 --> 00:01:22,500 quite a lot, 17 00:01:22,540 --> 00:01:24,800 still these are arrays to keep in mind. 18 00:01:24,850 --> 00:01:31,290 So these are embedded documents, another kind of data you can store are arrays 19 00:01:31,360 --> 00:01:37,140 and this is not strictly linked to embedded documents, though it can also be documents, 20 00:01:37,300 --> 00:01:43,780 you can have arrays in this case of embedded documents but arrays can hold any data, 21 00:01:43,780 --> 00:01:48,080 this simply means that you have lists of data in a document. 22 00:01:48,140 --> 00:01:51,350 Now this is of course very theoretical here, 23 00:01:51,490 --> 00:01:53,670 so let me show you an example in the next lecture.