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.
На этой странице сайта вы можете посмотреть видео онлайн MongoDB Tutorial - 6 - Data Types длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь JsWiz 12 Январь 2016, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 2,678 раз и оно понравилось 18 зрителям. Приятного просмотра!