Mongo Flashcards
D________ databases are usually categorized under the NoSQL umbrella term.
Document databases are usually categorized under the NoSQL umbrella term.
Document databases are usually categorized under the No____ umbrella term.
Document databases are usually categorized under the NoSQL umbrella term.
A d____ file, typically named “.env”, is used to store environment variables for an application, allowing developers to separate configuration settings from their code and manage sensitive information like API keys and database passwords securely without exposing them directly within the codebase
A dotenv file, typically named “.env”, is used to store environment variables for an application, allowing developers to separate configuration settings from their code and manage sensitive information like API keys and database passwords securely without exposing them directly within the codebase
A dotenv file, typically named “.env”, is used to store e________ v________s for an application, allowing developers to separate configuration settings from their code and manage sensitive information like API keys and database passwords securely without exposing them directly within the codebase
A dotenv file, typically named “.env”, is used to store environment variables for an application, allowing developers to separate configuration settings from their code and manage sensitive information like API keys and database passwords securely without exposing them directly within the codebase
C________s are analogous to tables in relational databases.
Collections are analogous to tables in relational databases.
Collections are analogous to t._._s in relational databases.
Collections are analogous to tables in relational databases.
Document databases like Mongo are s_____-less, meaning that the database itself does not care about the structure of the data that is stored in the database.
Document databases like Mongo are schemaless, meaning that the database itself does not care about the structure of the data that is stored in the database.
even though the ‘_id’ property of Mongoose objects looks like a string, it is in fact an o_______
even though the ‘_id’ property of Mongoose objects looks like a string, it is in fact an object*
The idea behind Mongoose is that the data stored in the database is given a schema at the level of the a________ that defines the shape of the documents stored in any given collection.
The idea behind Mongoose is that the data stored in the database is given a schema at the level of the application that defines the shape of the documents stored in any given collection.
const mongoose = require(‘m_._.._e’)
const mongoose = require(‘mongoose’)
At the top level, a MongoDB c________ is your deployment, which can contain multiple databases.
At the top level, a MongoDB cluster is your deployment, which can contain multiple databases.
Each d_________ within a cluster holds collections and is similar to the databases in relational systems.
Each database within a cluster holds collections and is similar to the databases in relational systems.
In Mongoose, a m______ represents a collection. Each m______ is mapped to one collection and defines how documents in that collection should be structured (according to the schema).
In Mongoose, a model represents a collection. Each model is mapped to one collection and defines how documents in that collection should be structured (according to the schema).
D________s are individual records in a collection and follow the structure defined by the model’s schema.
Documents are individual records in a collection and follow the structure defined by the model’s schema.
S_._._s lay out the blueprint for collections within a database.
Schemas lay out the blueprint for collections within a database.
In Mongoose, a s________ definition specifies the field names, the types of each field, the constraints, and other options for the data
In Mongoose, a schema definition specifies the field names, the types of each field, the constraints, and other options for the data
The schema defines collection => pass schema to m____ => m____ performs CRUD operations.
The schema defines collection => pass schema to model => model performs CRUD operations.
mongoose.connection.c_._.()
needs to be called so that the process can terminate after execution or else the process will hang.
mongoose.connection.close()
needs to be called so that the process can terminate after execution or else the process will hang.
Mongoose could be described as an object d_____ m_____ (ODM)
Mongoose could be described as an object document mapper (ODM)
the Mongoose convention is to automatically name collections as the plural (e.g. notes) when the s_____ refers to them in the singular (e.g. Note).
the Mongoose convention is to automatically name collections as the plural (e.g. notes) when the schema refers to them in the singular (e.g. Note).
Without i_______es, MongoDB must scan every document in a collection to find the documents that match each query. These collection scans are slow and can negatively affect the performance of your application. By using an i_____ to limit the number of documents MongoDB scans, queries can be more efficient and therefore return faster.
Without indexes, MongoDB must scan every document in a collection to find the documents that match each query. These collection scans are slow and can negatively affect the performance of your application. By using an index to limit the number of documents MongoDB scans, queries can be more efficient and therefore return faster.
MongoDB stores data records as B___ documents which are gathered together in collections.
MongoDB stores data records as BSON documents which are gathered together in collections.
BSON is a b_____ representation of JSON documents, though it contains more data types than JSON
BSON is a binary representation of JSON documents, though it contains more data types than JSON