MongoDB Tutorial - 6 - Data Types

Publicado em: 12 Janeiro 2016
no canal de: JsWiz
2,678
18

In this video, we're going to discuss what types of data we can add to our database.

Full Course: http://jswiz.net

We've already introduced the concepts of what a Schema and a Collection are. You can think of them as essentially being equal - In so much as the Schema forms a representation or Model in code of the data that gets stored in our collection.

There are 6 main data types. String, Number, Date, Array, Boolean and ObjectId.

This graphic shows you what a typical key/value assignment is when working with each type of data. Then below, what a typical JSON response object would look like. String, Number and Date are pretty self-explanatory. When using an array, we can define it with the Array reserved word or with the brackets. Booleans can be set to either true or false. ObjectId refers to another collection or Schema. In a future example, I will show you how we can have a Book schema that References an Author Schema using the type ObjectId.


Nesta página do site você pode assistir ao vídeo on-line MongoDB Tutorial - 6 - Data Types duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário JsWiz 12 Janeiro 2016, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 2,678 vezes e gostou 18 espectadores. Boa visualização!