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.
Sur cette page du site, vous pouvez voir la vidéo en ligne MongoDB Tutorial - 6 - Data Types durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur JsWiz 12 janvier 2016, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 2,678 fois et il a aimé 18 téléspectateurs. Bon visionnage!