Mongo Flashcards

1
Q

D________ databases are usually categorized under the NoSQL umbrella term.

A

Document databases are usually categorized under the NoSQL umbrella term.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Document databases are usually categorized under the No____ umbrella term.

A

Document databases are usually categorized under the NoSQL umbrella term.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

C________s are analogous to tables in relational databases.

A

Collections are analogous to tables in relational databases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Collections are analogous to t._._s in relational databases.

A

Collections are analogous to tables in relational databases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

even though the ‘_id’ property of Mongoose objects looks like a string, it is in fact an o_______

A

even though the ‘_id’ property of Mongoose objects looks like a string, it is in fact an object*

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

const mongoose = require(‘m_._.._e’)

A

const mongoose = require(‘mongoose’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

At the top level, a MongoDB c________ is your deployment, which can contain multiple databases.

A

At the top level, a MongoDB cluster is your deployment, which can contain multiple databases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Each d_________ within a cluster holds collections and is similar to the databases in relational systems.

A

Each database within a cluster holds collections and is similar to the databases in relational systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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).

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

D________s are individual records in a collection and follow the structure defined by the model’s schema.

A

Documents are individual records in a collection and follow the structure defined by the model’s schema.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

S_._._s lay out the blueprint for collections within a database.

A

Schemas lay out the blueprint for collections within a database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

In Mongoose, a s________ definition specifies the field names, the types of each field, the constraints, and other options for the data

A

In Mongoose, a schema definition specifies the field names, the types of each field, the constraints, and other options for the data

17
Q

The schema defines collection => pass schema to m____ => m____ performs CRUD operations.

A

The schema defines collection => pass schema to model => model performs CRUD operations.

18
Q

mongoose.connection.c_._.() needs to be called so that the process can terminate after execution or else the process will hang.

A

mongoose.connection.close() needs to be called so that the process can terminate after execution or else the process will hang.

19
Q

Mongoose could be described as an object d_____ m_____ (ODM)

A

Mongoose could be described as an object document mapper (ODM)

20
Q

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).

A

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).

21
Q

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.

A

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.

22
Q

MongoDB stores data records as B___ documents which are gathered together in collections.

A

MongoDB stores data records as BSON documents which are gathered together in collections.

23
Q

BSON is a b_____ representation of JSON documents, though it contains more data types than JSON

A

BSON is a binary representation of JSON documents, though it contains more data types than JSON