We're almost done with this module.
Now let me show you two other important pieces of data you can put into your documents.
You can use embedded documents and this is actually a core feature of mongodb and a core feature
I'll come back to in my data schema and relations module in this course.
Let's imagine this box is one document, embedded documents then simply means that you can have a field
in your document like name
but then this could be another document, so the value of the field could be another document and
you can have multiple such documents and these documents can have other sub documents which can have
other sub documents, so you can nest your documents all in one overarching document in one collection.
So here we can have up to 100 levels of nesting in mongodb,
this is a hard limit but you can have a lot of nesting
and to be honest, you rarely need more than three or four levels and you always got another hard limit,
the overall documents size has to be below 60 megabytes.
That might sound small but since you only store text in there, you don't store files in mongodb
for example, you would use your file storage for that, since it's only text, 16 megabytes is actually
quite a lot,
still these are arrays to keep in mind.
So these are embedded documents, another kind of data you can store are arrays
and this is not strictly linked to embedded documents, though it can also be documents,
you can have arrays in this case of embedded documents but arrays can hold any data,
this simply means that you have lists of data in a document.
Now this is of course very theoretical here,
so let me show you an example in the next lecture.